gcc: Legacy type encoding
1
1 8.3.1 Legacy Type Encoding
1 --------------------------
1
1 Unfortunately, historically GCC used to have a number of bugs in its
1 encoding code. The NeXT runtime expects GCC to emit type encodings in
1 this historical format (compatible with GCC-3.3), so when using the NeXT
1 runtime, GCC will introduce on purpose a number of incorrect encodings:
1
1 * the read-only qualifier of the pointee gets emitted before the '^'.
1 The read-only qualifier of the pointer itself gets ignored, unless
1 it is a typedef. Also, the 'r' is only emitted for the outermost
1 type.
1
1 * 32-bit longs are encoded as 'l' or 'L', but not always. For
1 typedefs, the compiler uses 'i' or 'I' instead if encoding a struct
1 field or a pointer.
1
1 * 'enum's are always encoded as 'i' (int) even if they are actually
1 unsigned or long.
1
1 In addition to that, the NeXT runtime uses a different encoding for
1 bitfields. It encodes them as 'b' followed by the size, without a bit
1 offset or the underlying field type.
1