The following macros can be tested for enabled C99 features, features related to GNU C or C++, and other IBM language extensions. A macro is defined to the value of 1 if the listed feature is supported under the specified compiler option. If the feature is not supported, then the macro is undefined. All predefined macros are protected.
Predefined macro name | Description | Compiler option: |
---|---|---|
__ALTIVEC__ | Support for vector data types | -qaltivec |
__C99_BOOL | Support for the _Bool data type |
![]() |
__C99_COMPLEX | Support for complex data types |
![]() |
__C99_COMPLEX_HEADERS__ | Support for C99-style complex headers |
![]() |
__C99_CPLUSCMT | Support for C++ style comments |
-qlanglvl=stdc99|extc99 -qcpluscmt |
__C99_COMPOUND_LITERAL | Support for compound literals |
![]() |
__C99_DESIGNATED_INITIALIZER | Support for designated initialization |
![]() |
__C99_DUP_TYPE_QUALIFIER | Support for duplicated type qualifiers |
![]() |
__C99_EMPTY_MACRO_ARGUMENTS | Support for empty macro arguments |
![]()
|
__C99_FLEXIBLE_ARRAY_MEMBER | Support for flexible array members |
![]() |
__C99__FUNC__ | Support for the __func__ keyword |
|
__C99_HEX_FLOAT_CONST | Support for hexadecimal floating constants |
![]()
|
__C99_INLINE | Support for the inline function specifier |
![]() -qkeyword=inline |
__C99_LLONG | Support for long long data types |
![]() |
__C99_MACRO_WITH_VA_ARGS | Support for function-like macros with variable arguments |
|
__C99_MAX_LINE_NUMBER | New limit for #line directive |
![]() |
__C99_MIXED_DECL_AND_CODE | Support for mixed declaration and code |
![]() |
__C99_MIXED_STRING_CONCAT | Support for concatenation of wide string and non-wide string literals |
![]() |
__C99_NON_LVALUE_ARRAY_SUB | Support for non-lvalue subscripts for arrays |
![]() |
__C99_NON_CONST_AGGR_INITIALIZER | Support for non-constant aggregate initializers |
![]() |
__C99_PRAGMA_OPERATOR | Support for the _Pragma operator |
|
__C99_REQUIRE_FUNC_DECL | Implicit function declaration not supported |
![]() |
__C99_RESTRICT | Support for the restrict qualifier |
|
__C99_STATIC_ARRAY_SIZE | Support for the static keyword in array parameters to functions |
![]() |
__C99_STD_PRAGMAS | Support for standard pragmas |
![]() |
__C99_TGMATH | Support for type-generic macros in tgmath.h |
![]() |
__C99_UCN | Support for universal character names |
![]()
|
__C99_VAR_LEN_ARRAY | Support for variable length arrays |
![]() |
__C99_VARIABLE_LENGTH_ARRAY |
|
|
__IBM__ALIGNOF__ | Support for the __alignof__ operator |
|
__IBM_ALTERNATE_KEYWORDS | Support for alternate keywords |
![]() |
__IBM_ATTRIBUTES | Support for type, variable, and function attributes |
|
__IBM_COMPUTED_GOTO | Support for computed goto statements |
|
__IBM_EXTENSION_KEYWORD | Support for the __extension__ keyword |
|
__IBM_GCC_ASM | Support for GNU C inline asm statements |
|
__IBM_GCC__INLINE__ | Support for the GNU C __inline__ specifier |
|
__IBM_DOLLAR_IN_ID | Support for dollar signs in identifiers |
|
__IBM_GENERALIZED_LVALUE | Support for generalized lvalues |
|
__IBM_INCLUDE_NEXT | Support for the #include_next preprocessing directive |
|
__IBM_LABEL_VALUE | Support for labels as values |
|
__IBM_LOCAL_LABEL | Support for local labels |
|
__IBM_MACRO_WITH_VA_ARGS | Support for variadic macro extensions |
|
_IBM_NESTED_FUNCTION | Support for nested functions |
|
__IBM_PP_PREDICATE | Support for #assert, #unassert, #cpu, #machine, and #system preprocessing directives |
|
__IBM_PP_WARNING | Support for the #warning preprocessing directive |
|
__IBM_REGISTER_VARS | Support for variables in specified registers |
|
__IBM_STDCPP_ASM | Support for asm statements. If assembler code is generated, the macro has the value 1; otherwise, 0 |
|
__IBM__TYPEOF__ | Support for the __typeof__ keyword |
|
__IBM_UTF_LITERAL | Support for UTF-16 and UTF-32 string literals | -qutf |