This is the method used by Sun's
acc for defining builtin types.
These are the type descriptors to define builtin types:
bsigned char-flag width
wchar_tso the debugger can print such variables differently (Solaris does not do this). Sun sets it on the C types
unsigned charwhich arguably is wrong. width and offset appear to be for small objects stored in larger ones, for example a
intregister. width is normally the number of bytes in the type. offset seems to always be zero. nbits is the number of bits in the type.
Note that type descriptor ‘b’ used for builtin types conflicts with
its use for Pascal space types (see Miscellaneous Types); they can
be distinguished because the character following the type descriptor
will be a digit, ‘(’, or ‘-’ for a Pascal space type, or
‘u’ or ‘s’ for a builtin type.
double complex, and
complex*16, respectively, but what does that mean? (i.e., Single precision? Double precision?).
long double, and new codes should be used for other floating point formats (
NF_DOUBLEcan be used if a
long doubleis really just an IEEE double, of course).
bytes is the number of bytes occupied by the type. This allows a
debugger to perform some operations with the type even if it doesn't
void type is defined as a signed integral type 0 bits long:
The Solaris compiler seems to omit the trailing semicolon in this case. Getting sloppy in this way is not a swift move because if a type is embedded in a more complex expression it is necessary to be able to tell where it ends.
I'm not sure how a boolean type is represented.