Next: Registers, Previous: Storage Layout, Up: Target Macros
These macros define the sizes and other characteristics of the standard basic data types used in programs being compiled. Unlike the macros in the previous section, these apply to specific features of C and related languages, rather than to fundamental aspects of storage layout.
A C expression for the size in bits of the type
inton the target machine. If you don't define this, the default is one word.
A C expression for the size in bits of the type
shorton the target machine. If you don't define this, the default is half a word. (If this would be less than one storage unit, it is rounded up to one unit.)
A C expression for the size in bits of the type
longon the target machine. If you don't define this, the default is one word.
On some machines, the size used for the Ada equivalent of the type
longby a native Ada compiler differs from that used by C. In that situation, define this macro to be a C expression to be used for the size of that type. If you don't define this, the default is the value ofLONG_TYPE_SIZE.
A C expression for the size in bits of the type
long longon the target machine. If you don't define this, the default is two words. If you want to support GNU Ada on your machine, the value of this macro must be at least 64.
A C expression for the size in bits of the type
charon the target machine. If you don't define this, the default isBITS_PER_UNIT.
A C expression for the size in bits of the C++ type
booland C99 type_Boolon the target machine. If you don't define this, and you probably shouldn't, the default isCHAR_TYPE_SIZE.
A C expression for the size in bits of the type
floaton the target machine. If you don't define this, the default is one word.
A C expression for the size in bits of the type
doubleon the target machine. If you don't define this, the default is two words.
A C expression for the size in bits of the type
long doubleon the target machine. If you don't define this, the default is two words.
Define this macro if
LONG_DOUBLE_TYPE_SIZEis not constant or if you want routines in libgcc2.a for a size other thanLONG_DOUBLE_TYPE_SIZE. If you don't define this, the default isLONG_DOUBLE_TYPE_SIZE.
Define this macro if neither
LIBGCC2_DOUBLE_TYPE_SIZEnorLIBGCC2_LONG_DOUBLE_TYPE_SIZEisDFmodebut you wantDFmoderoutines in libgcc2.a anyway. If you don't define this and eitherLIBGCC2_DOUBLE_TYPE_SIZEorLIBGCC2_LONG_DOUBLE_TYPE_SIZEis 64 then the default is 1, otherwise it is 0.
Define this macro if
LIBGCC2_LONG_DOUBLE_TYPE_SIZEis notXFmodebut you wantXFmoderoutines in libgcc2.a anyway. If you don't define this andLIBGCC2_LONG_DOUBLE_TYPE_SIZEis 80 then the default is 1, otherwise it is 0.
Define this macro if
LIBGCC2_LONG_DOUBLE_TYPE_SIZEis notTFmodebut you wantTFmoderoutines in libgcc2.a anyway. If you don't define this andLIBGCC2_LONG_DOUBLE_TYPE_SIZEis 128 then the default is 1, otherwise it is 0.
Define these macros to be the size in bits of the mantissa of
SFmode,DFmode,XFmodeandTFmodevalues, if the defaults in libgcc2.h are inappropriate. By default,FLT_MANT_DIGis used forSF_SIZE,LDBL_MANT_DIGforXF_SIZEandTF_SIZE, andDBL_MANT_DIGorLDBL_MANT_DIGforDF_SIZEaccording to whetherLIBGCC2_DOUBLE_TYPE_SIZEorLIBGCC2_LONG_DOUBLE_TYPE_SIZEis 64.
A C expression for the value for
FLT_EVAL_METHODin float.h, assuming, if applicable, that the floating-point control word is in its default state. If you do not define this macro the value ofFLT_EVAL_METHODwill be zero.
A C expression for the size in bits of the widest floating-point format supported by the hardware. If you define this macro, you must specify a value less than or equal to the value of
LONG_DOUBLE_TYPE_SIZE. If you do not define this macro, the value ofLONG_DOUBLE_TYPE_SIZEis the default.
An expression whose value is 1 or 0, according to whether the type
charshould be signed or unsigned by default. The user can always override this default with the options -fsigned-char and -funsigned-char.
This target hook should return true if the compiler should give an
enumtype only as many bytes as it takes to represent the range of possible values of that type. It should return false if allenumtypes should be allocated likeint.The default is to return false.
A C expression for a string describing the name of the data type to use for size values. The typedef name
size_tis defined using the contents of the string.The string can contain more than one keyword. If so, separate them with spaces, and write first any length keyword, then
unsignedif appropriate, and finallyint. The string must exactly match one of the data type names defined in the functioninit_decl_processingin the file c-decl.c. You may not omitintor change the order—that would cause the compiler to crash on startup.If you don't define this macro, the default is
"long unsigned int".
A C expression for a string describing the name of the data type to use for the result of subtracting two pointers. The typedef name
ptrdiff_tis defined using the contents of the string. SeeSIZE_TYPEabove for more information.If you don't define this macro, the default is
"long int".
A C expression for a string describing the name of the data type to use for wide characters. The typedef name
wchar_tis defined using the contents of the string. SeeSIZE_TYPEabove for more information.If you don't define this macro, the default is
"int".
A C expression for the size in bits of the data type for wide characters. This is used in
cpp, which cannot make use ofWCHAR_TYPE.
A C expression for a string describing the name of the data type to use for wide characters passed to
printfand returned fromgetwc. The typedef namewint_tis defined using the contents of the string. SeeSIZE_TYPEabove for more information.If you don't define this macro, the default is
"unsigned int".
A C expression for a string describing the name of the data type that can represent any value of any standard or extended signed integer type. The typedef name
intmax_tis defined using the contents of the string. SeeSIZE_TYPEabove for more information.If you don't define this macro, the default is the first of
"int","long int", or"long long int"that has as much precision aslong long int.
A C expression for a string describing the name of the data type that can represent any value of any standard or extended unsigned integer type. The typedef name
uintmax_tis defined using the contents of the string. SeeSIZE_TYPEabove for more information.If you don't define this macro, the default is the first of
"unsigned int","long unsigned int", or"long long unsigned int"that has as much precision aslong long unsigned int.
The C++ compiler represents a pointer-to-member-function with a struct that looks like:
struct { union { void (*fn)(); ptrdiff_t vtable_index; }; ptrdiff_t delta; };The C++ compiler must use one bit to indicate whether the function that will be called through a pointer-to-member-function is virtual. Normally, we assume that the low-order bit of a function pointer must always be zero. Then, by ensuring that the vtable_index is odd, we can distinguish which variant of the union is in use. But, on some platforms function pointers can be odd, and so this doesn't work. In that case, we use the low-order bit of the
deltafield, and shift the remainder of thedeltafield to the left.GCC will automatically make the right selection about where to store this bit using the
FUNCTION_BOUNDARYsetting for your platform. However, some platforms such as ARM/Thumb haveFUNCTION_BOUNDARYset such that functions always start at even addresses, but the lowest bit of pointers to functions indicate whether the function at that address is in ARM or Thumb mode. If this is the case of your architecture, you should define this macro toptrmemfunc_vbit_in_delta.In general, you should not have to define this macro. On architectures in which function addresses are always even, according to
FUNCTION_BOUNDARY, GCC will automatically define this macro toptrmemfunc_vbit_in_pfn.
Normally, the C++ compiler uses function pointers in vtables. This macro allows the target to change to use “function descriptors” instead. Function descriptors are found on targets for whom a function pointer is actually a small data structure. Normally the data structure consists of the actual code address plus a data pointer to which the function's data is relative.
If vtables are used, the value of this macro should be the number of words that the function descriptor occupies.