Skip to content
Jiri Malak edited this page Apr 19, 2024 · 34 revisions

C99 compatibility is an undocumented feature, since the implementation is not complete. Use the -zastd=c99 switch to turn on the C99 extensions that are implemented (see below).

When and if other C99 features will be added depends purely on how much effort contributors want to invest. Some features are fairly esoteric and there appears to be little or no demand for them (eg. complex math). The features most likely to be implemented are the ones that add new functionality that cannot be achieved through other means (eg. hex floating-point constants).

Compiler Compliance

Feature Status Notes
restricted character set support via digraphs partialy :> is used as OW far pointer operator
restricted pointers yes with -zastd=c99 option
variable length arrays -
flexible array members yes
static and type qualifiers in parameter array declarators -
long long int type support yes
complex and imaginary types support yes
increased minimum translation limits yes generally no fixed limits in compiler
remove implicit int yes diagnosed via W304, W305
remove implicit function declaration yes diagnosed via W131
return without expression not permitted in function that returns a value (and vice versa) yes diagnosed via W107, E1051, E1096
universal character names (\u and \U) -
extended identifiers yes all characters of an identifier are significant
hexadecimal floating-point constants yes
compound literals -
designated initializers yes
// comments yes
preprocessor arithmetic done in intmax_t/uintmax_t yes with -zastd=c99 option
preprocessor #line directive line number extended range 1-2147483647 yes
mixed declarations and code yes
macros with a variable number of arguments yes
trailing comma allowed in enum declaration yes
inline functions yes
boolean type _Bool yes with -zastd=c99 option
empty macro arguments yes
_Pragma preprocessing operator yes
__func__ predefined identifier yes
relaxed constraints on aggregate and union initialization yes with -aa option
relaxed restrictions on portable header names yes
more precise aliasing rules via effective type ???
treatment of error conditions by math library functions (math_errhandling) ???
reliable integer division ???
new block scopes for selection and iteration statements ???
integer constant type rules ???
integer promotion rules ???
new structure type compatibility rules (tag compatibility) ???
additional predefined macro names ???
standard pragmas ???
LIA compatibility annex ???
deprecate ungetc at the beginning of a binary file ???
remove deprecation of aliased array parameters ???
conversion of array to pointer not limited to lvalues ???

- means not yet implemented

??? means unclear

C Library and Header files Compliance

Feature Status Notes
restricted character set support header file <iso646.h> yes
wide character support in library and <wchar.h> and <wctype.h> yes
complex and imaginary support in library and <complex.h> yes
header file <tgmath.h> -
long long int type functions support in library and header files yes
additional floating-point characteristics in <float.h> yes
%a and %A printf/scanf conversion specifiers partial implemented for printf, missing for scanf
extended integer types functions support in library and <inttypes.h> and <stdint.h> yes
the vscanf family of functions support in library and <stdio.h> and <wchar.h> yes
additional math functions support in library and <math.h> partial need to add missing float and long double versions for some functions
floating-point environment access in <fenv.h> yes
%lf conversion specifier allowed in printf yes
<stdbool.h> header file yes uses _Bool with -zastd=c99 option, otherwise unsigned char
va_copy macro yes
additional strftime conversion specifiers yes

- means not yet implemented

??? means unclear

Clone this wiki locally