[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

21.5 Layout of Source Language Data Types

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.

INT_TYPE_SIZE
A C expression for the size in bits of the type int on the target machine. If you don't define this, the default is one word.

MAX_INT_TYPE_SIZE
Maximum number for the size in bits of the type int on the target machine. If this is undefined, the default is INT_TYPE_SIZE. Otherwise, it is the constant value that is the largest value that INT_TYPE_SIZE can have at run-time. This is used in cpp.

SHORT_TYPE_SIZE
A C expression for the size in bits of the type short on 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.)

LONG_TYPE_SIZE
A C expression for the size in bits of the type long on the target machine. If you don't define this, the default is one word.

MAX_LONG_TYPE_SIZE
Maximum number for the size in bits of the type long on the target machine. If this is undefined, the default is LONG_TYPE_SIZE. Otherwise, it is the constant value that is the largest value that LONG_TYPE_SIZE can have at run-time. This is used in cpp.

LONG_LONG_TYPE_SIZE
A C expression for the size in bits of the type long long on 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.

CHAR_TYPE_SIZE
A C expression for the size in bits of the type char on the target machine. If you don't define this, the default is BITS_PER_UNIT.

MAX_CHAR_TYPE_SIZE
Maximum number for the size in bits of the type char on the target machine. If this is undefined, the default is CHAR_TYPE_SIZE. Otherwise, it is the constant value that is the largest value that CHAR_TYPE_SIZE can have at run-time. This is used in cpp.

FLOAT_TYPE_SIZE
A C expression for the size in bits of the type float on the target machine. If you don't define this, the default is one word.

DOUBLE_TYPE_SIZE
A C expression for the size in bits of the type double on the target machine. If you don't define this, the default is two words.

LONG_DOUBLE_TYPE_SIZE
A C expression for the size in bits of the type long double on the target machine. If you don't define this, the default is two words.

WIDEST_HARDWARE_FP_SIZE
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 of LONG_DOUBLE_TYPE_SIZE is the default.

DEFAULT_SIGNED_CHAR
An expression whose value is 1 or 0, according to whether the type char should be signed or unsigned by default. The user can always override this default with the options `-fsigned-char' and `-funsigned-char'.

DEFAULT_SHORT_ENUMS
A C expression to determine whether to give an enum type only as many bytes as it takes to represent the range of possible values of that type. A nonzero value means to do that; a zero value means all enum types should be allocated like int.

If you don't define the macro, the default is 0.

SIZE_TYPE
A C expression for a string describing the name of the data type to use for size values. The typedef name size_t is 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 unsigned if appropriate, and finally int. The string must exactly match one of the data type names defined in the function init_decl_processing in the file `c-decl.c'. You may not omit int or 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".

PTRDIFF_TYPE
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_t is defined using the contents of the string. See SIZE_TYPE above for more information.

If you don't define this macro, the default is "long int".

WCHAR_TYPE
A C expression for a string describing the name of the data type to use for wide characters. The typedef name wchar_t is defined using the contents of the string. See SIZE_TYPE above for more information.

If you don't define this macro, the default is "int".

WCHAR_TYPE_SIZE
A C expression for the size in bits of the data type for wide characters. This is used in cpp, which cannot make use of WCHAR_TYPE.

MAX_WCHAR_TYPE_SIZE
Maximum number for the size in bits of the data type for wide characters. If this is undefined, the default is WCHAR_TYPE_SIZE. Otherwise, it is the constant value that is the largest value that WCHAR_TYPE_SIZE can have at run-time. This is used in cpp.

WINT_TYPE
A C expression for a string describing the name of the data type to use for wide characters passed to printf and returned from getwc. The typedef name wint_t is defined using the contents of the string. See SIZE_TYPE above for more information.

If you don't define this macro, the default is "unsigned int".

INTMAX_TYPE
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_t is defined using the contents of the string. See SIZE_TYPE above 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 as long long int.

UINTMAX_TYPE
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_t is defined using the contents of the string. See SIZE_TYPE above 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 as long long unsigned int.

OBJC_INT_SELECTORS
Define this macro if the type of Objective C selectors should be int.

If this macro is not defined, then selectors should have the type struct objc_selector *.

OBJC_SELECTORS_WITHOUT_LABELS
Define this macro if the compiler can group all the selectors together into a vector and use just one label at the beginning of the vector. Otherwise, the compiler must give each selector its own assembler label.

On certain machines, it is important to have a separate label for each selector because this enables the linker to eliminate duplicate selectors.

TARGET_PTRMEMFUNC_VBIT_LOCATION
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 delta field, and shift the remainder of the delta field to the left.

GCC will automatically make the right selection about where to store this bit using the FUNCTION_BOUNDARY setting for your platform. However, some platforms such as ARM/Thumb have FUNCTION_BOUNDARY set 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 to ptrmemfunc_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 to ptrmemfunc_vbit_in_pfn.

TARGET_BELL
A C constant expression for the integer value for escape sequence `\a'.

TARGET_BS
TARGET_TAB
TARGET_NEWLINE
C constant expressions for the integer values for escape sequences `\b', `\t' and `\n'.

TARGET_VT
TARGET_FF
TARGET_CR
C constant expressions for the integer values for escape sequences `\v', `\f' and `\r'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Vincent Chung on June, 26 2001 using texi2html