C99 features

The following features are enabled by default when you compile with any of the following commands:
  • the xlc invocation command
  • the c99 invocation command
  • the -qlanglvl=extc99 | stdc99 | extc89 | extended | extc1x options
For more information on these options, see the -qlanglvl option .
Table 1. Default C99 features as extensions to C89
Language feature Discussed in:
Hexadecimal floating-point constants Hexadecimal floating-point literals
__func__ predefined identifier The __func__ predefined identifier
Concatenation of wide and non-wide character strings String concatenation
Mixed declarations and code Overview of data declarations and definitions
Complex data type Complex floating-point types
_Bool data type Boolean types
Trailing comma allowed in enum declaration Enumeration type definition
Duplicate type qualifiers Type qualifiers
Variable length arrays Variable length arrays
Non-lvalue array subscripts Array subscripting operator [ ]
Flexible array members at the end of a structure or union Flexible array members
Non-constant expression in initializer for structure or union Initialization of structures and unions
Designated initializers Designated initializers for aggregate types (C only)
Removal of implicit function declaration Function declarations
Removal of implicit int return type in function declarations Function return type specifiers
Static arrays as function parameters Static array indices in function parameter declarations (C only)
Variable arguments in function-like macros Function-like macros
Empty arguments in function-like macros Function-like macros
Additional predefined macro names Standard predefined macro names
Compound literals Compound literal expressions
_Pragma operator The _Pragma preprocessing operator
Standard pragmas Standard pragmas (C only)
The following features are enabled by default when you compile with any of the following commands:
  • the xlc invocation command
  • the c99 invocation command
  • the -qlanglvl=extc99 | stdc99 | extc89 | extended | extc1x options
They are also enabled or disabled by specific compiler options, which are listed in the below table:
Table 2. Default C99 features as extensions to C89, with individual option controls
Language feature Discussed in: Individual option control
Digraphs Digraph characters -q[no]digraph
C++ style comments Comments -q[no]cpluscmt
The inline function specifier The inline function specifier -qkeyword=inline
The following feature is enabled by default when you compile with any of the following commands:
  • the xlc invocation command
  • the c99 invocation command
  • the -qlanglvl=extc99 | stdc99 | extc1x options
Table 3. Strict C99 features as extensions to C89
Language feature Discussed in:
C99 long long Types of integer literals in C99
Note: This feature is incompatible with the semantics of the long long types controlled by the -qlonglong option. For details, see -qlonglong.
The following features are enabled by default when you compile with any of the following commands:
  • the xlc invocation command
  • the c99 invocation command
  • the -qlanglvl=extc99 | stdc99 | extc1x options
They are also enabled or disabled by specific compiler options, which are listed in the below table:
Table 4. Strict C99 features as extensions to C89, with individual option controls
Language feature Discussed in: Individual option control
Universal character names The Unicode standard -qlanglvl=[no]ucs
The restrict type qualifier The restrict type qualifier -qkeyword=restrict