Next: Registers, Previous: Storage Layout, Up: Target Macros
这些宏定义了在被编译的程序中使用的标准基础数据类型的大小和其它特征。 不像之前章节中的宏,这些是应用到C和相关语言的特定特征上, 而不是存储布局的基础方面。
在一些机器上,本地Ada编译器使用的类型
long的大小与C使用的不相同。 这种情况下,定义该宏为一个C表达式用于那个类型的大小。如果没有定义, 则缺省为LONG_TYPE_SIZE的值。
一个C表达式,为在target机器上类型
long long的位大小。如果没有定义, 缺省为两个字。如果你想在你的机器上支持GNU Ada,则该宏的值最少必须为64。
一个C表达式,为在target机器上C++类型
bool和C99类型_Bool的位大小。 如果没有定义,并且通常不会定义,缺省为CHAR_TYPE_SIZE。
一个C表达式,为在target机器上类型
long long _Fract的位大小。 如果没有定义,缺省为BITS_PER_UNIT * 8。
一个C表达式,为在target机器上类型
long long _Accum的位大小。 如果没有定义,缺省为BITS_PER_UNIT * 16。
定义该宏,如果
LONG_DOUBLE_TYPE_SIZE不是常量或者如果你想让libgcc2.a 中具有大小不是LONG_DOUBLE_TYPE_SIZE的程序。如果没有定义, 缺省为LONG_DOUBLE_TYPE_SIZE。
定义该宏,如果
LIBGCC2_DOUBLE_TYPE_SIZE和LIBGCC2_LONG_DOUBLE_TYPE_SIZE都不是DFmode, 但是你还想让libgcc2.a中具有DFmode的程序。如果没有定义, 并且LIBGCC2_DOUBLE_TYPE_SIZE或LIBGCC2_LONG_DOUBLE_TYPE_SIZE为64, 则缺省为1,否则为0。
定义该宏,如果
LIBGCC2_LONG_DOUBLE_TYPE_SIZE不是XFmode, 但是你还想让libgcc2.a中具有XFmode的程序。如果没有定义, 并且LIBGCC2_LONG_DOUBLE_TYPE_SIZE为80,则缺省为1,否则为0。
定义该宏,如果
LIBGCC2_LONG_DOUBLE_TYPE_SIZE不是TFmode, 但是你还想让libgcc2.a中具有TFmode的程序。如果没有定义, 并且LIBGCC2_LONG_DOUBLE_TYPE_SIZE为128,则缺省为1,否则为0。
定义这些宏为
SFmode,DFmode,XFmode和TFmode值的尾数 位大小,如果在libgcc2.h中的缺省定义不合适。缺省的,FLT_MANT_DIG用于SF_SIZE,LDBL_MANT_DIG用于XF_SIZE和TF_SIZE,并且DBL_MANT_DIG或LDBL_MANT_DIG用于DF_SIZE,根据LIBGCC2_DOUBLE_TYPE_SIZE或LIBGCC2_LONG_DOUBLE_TYPE_SIZE是否为64。
一个C表达式,为硬件支持的最宽浮点格式的位数。如果定义该宏, 则必须指定一个小于或等于
LONG_DOUBLE_TYPE_SIZE的值。如果没有定义, 则缺省为LONG_DOUBLE_TYPE_SIZE的值。
一个表达式,其值为1或者0,根据类型
char缺省应该为有符号的还是无符号的。 用户总是可以使用选项-fsigned-char和-funsigned-char来覆盖该缺省定义。
该target钩子应该返回真,如果编译器应该为
enum类型设置为可以表示该类型值 范围的字节数。其应该返回假,如果所有的enum类型应该按照int类型的 方式来分配。缺省为返回假。
一个C表达式,为一个字符串描述了用于size值的数据类型名。 typedef名
size_t使用该字符串的内容来定义。字符串可以包含多一个的关键字。如果是这样,则将它们使用空格分开, 首先是任意长度的关键字,然后是合适
unsigned的,最后是int。 字符串必须显示的匹配文件c-decl.c中函数init_decl_processing中 定义的数据类型名。不可以省略掉int或者改变顺序, 这将会使编译器在启动时崩溃。如果没有定义,缺省为
"long unsigned int"。
一个C表达式,为一个字符串,描述了用于两个指针相减的结果的数据类型名。 typedef名
ptrdiff_t使用该字符串的内容来定义。更多信息, 参见上面的SIZE_TYPE。如果没有定义,则缺省为
"long int"。
一个C表达式,为一个字符串,描述了用于宽字符的数据类型名。 typedef名
wchar_t使用该字符串的内容来定义。更多信息, 参见上面的SIZE_TYPE。如果没有定义,则缺省为
"int"。
一个C表达式,为一个字符串, 描述了传递给
printf并且从getwc中返回的宽字符数据类型名。 typedef名wint_t使用该字符串的内容来定义。更多信息, 参见上面的SIZE_TYPE。如果没有定义,则缺省为
"unsigned int"。
一个C表达式,为一个字符串, 描述了可以表示任何标准或者扩展的有符号整数类型值的数据类型名。 typedef名
intmax_t使用该字符串的内容来定义。更多信息, 参见上面的SIZE_TYPE。如果没有定义,则缺省为
"int","long int"或"long long int"中第一个与long long int具有相同精度的字符串。
一个C表达式,为一个字符串, 描述了可以表示任何标准或者扩展的无符号整数类型值的数据类型名。 typedef名
uintmax_t使用该字符串的内容来定义。更多信息, 参见上面的SIZE_TYPE。如果没有定义,则缺省为
"unsigned int","long unsigned int"或"long long unsigned int"中第一个与long long unsigned int具有相同精度的字符串。
C expressions for the standard types
sig_atomic_t,int8_t,int16_t,int32_t,int64_t,uint8_t,uint16_t,uint32_t,uint64_t,int_least8_t,int_least16_t,int_least32_t,int_least64_t,uint_least8_t,uint_least16_t,uint_least32_t,uint_least64_t,int_fast8_t,int_fast16_t,int_fast32_t,int_fast64_t,uint_fast8_t,uint_fast16_t,uint_fast32_t,uint_fast64_t,intptr_t, anduintptr_t. SeeSIZE_TYPEabove for more information.If any of these macros evaluates to a null pointer, the corresponding type is not supported; if GCC is configured to provide
<stdint.h>in such a case, the header provided may not conform to C99, depending on the type in question. The defaults for all of these macros are null pointers.
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.