ORCA/C was originally designed as a near-complete implementation of the initial ANSI C standard (C89/C90). We are working on adding support for features from later C standards. Most features from the standard up to C17 are now supported, but some others (mainly optional features) are not.
For reference, this issue contains a list of significant new features in the various C standards (derived mostly from Annex M in recent C standard drafts). This includes features of both the language and libraries. Note that this is not a comprehensive list of all changes in the standards, and that some of these items are optional features that are not required to be implemented.
Items should be checked off in this list if they are fully implemented. If they are partially implemented, a note explaining that can be added.
Features from C89/C90 that were not supported in ORCA/C:
[x] locale support (<locale.h> header)
minimalistic, but should comply with C standards
[ ] wide character and string constants in the language (L-prefixed)
[ ] multibyte/wide character and string functions in <stdlib.h>
mblen is now supported, but wide character/string functions are not
[x] strcoll and strxfrm functions in <string.h>
[x] strftime function in <time.h>
[x] bit-fields in unions
Major changes in C95 (Amendment 1 to C90, __STDC_VERSION__199409L) included:
[x] addition of the predefined __STDC_VERSION__ macro
[x] restricted character set support via digraphs and <iso646.h>
[ ] wide character library support in <wchar.h> and <wctype.h>
Major changes in C99 (__STDC_VERSION__199901L) included:
[x] more precise aliasing rules via effective type
enables some optimizations, but does not require any implementation changes
[x] restricted pointers
[ ] variable length arrays (optional in C11)
[x] flexible array members
[x] static and type qualifiers in parameter array declarators
[ ] complex (and imaginary) support in <complex.h> (optional in C11)
[x] type-generic math macros in <tgmath.h>
[x] the long long int type and library functions
[ ] extended integer types
[ ] increased minimum translation limits
Most (if not all) should be supported, but they have not been verified
[x] additional floating-point characteristics in <float.h>
[x] remove implicit int
Checked via #pragma lint
[x] reliable integer division
[x] universal character names (\u and \U)
[x] extended identifiers
[x] hexadecimal floating-point constants and %a and %A printf/scanf conversion specifiers
Supported in the compiler, printf, scanf, and strtod
[x] compound literals
[x] designated initializers
[x] // comments
[x] specified width integer types and corresponding library functions in <inttypes.h> and <stdint.h>
[x] remove implicit function declaration
Checked via #pragma lint
[x] preprocessor arithmetic done in intmax_t/uintmax_t
[x] mixed declarations and statements
[x] new block scopes for selection and iteration statements
[x] integer constant type rules
[x] integer promotion rules
[x] macros with a variable number of arguments (__VA_ARGS__)
[x] the vscanf family of functions in <stdio.h> and <wchar.h>
[x] additional math library functions in <math.h>
[x] treatment of error conditions by math library functions (math_errhandling)
[x] floating-point environment access in <fenv.h>
[ ] IEC 60559 (also known as IEC 559 or IEEE arithmetic) support
[x] trailing comma allowed in enum declaration
[x] %lf conversion specifier allowed in printf
[x] inline functions
not actually inlined
[x] the snprintf family of functions in <stdio.h>
[x] boolean type in <stdbool.h>
[x] idempotent type qualifiers
[x] empty macro arguments
[x] new structure type compatibility rules (tag compatibility)
no implementation changes required
[x] additional predefined macro names
[x] _Pragma preprocessing operator
[x] standard pragmas
[x] __func__ predefined identifier
[x] va_copy macro
[x] additional strftime conversion specifiers
[ ] LIA compatibility annex
[x] deprecate ungetc at the beginning of a binary file
no implementation changes required
[x] remove deprecation of aliased array parameters
no implementation changes required
[ ] conversion of array to pointer not limited to lvalues
largely supported, but does not follow C11 lifetime rules for arrays in returned structs
[x] relaxed constraints on aggregate and union initialization
[x] relaxed restrictions on portable header names
Use HFS/AppleShare/etc. if you need header names containing underscores
[x] return without expression not permitted in function that returns a value (and vice versa)
Checked via #pragma lint
Major changes in C11 (__STDC_VERSION__201112L) included:
[ ] conditional (optional) features (including some that were previously mandatory)
[ ] support for multiple threads of execution including an improved memory sequencing model, atomic objects, and thread-local storage (<stdatomic.h> and <threads.h>)
_Thread_local is supported, but multithreading is not
ORCA/C was originally designed as a near-complete implementation of the initial ANSI C standard (C89/C90). We are working on adding support for features from later C standards. Most features from the standard up to C17 are now supported, but some others (mainly optional features) are not.
For reference, this issue contains a list of significant new features in the various C standards (derived mostly from Annex M in recent C standard drafts). This includes features of both the language and libraries. Note that this is not a comprehensive list of all changes in the standards, and that some of these items are optional features that are not required to be implemented.
Items should be checked off in this list if they are fully implemented. If they are partially implemented, a note explaining that can be added.
Features from C89/C90 that were not supported in ORCA/C:
<locale.h>
header)L
-prefixed)<stdlib.h>
mblen
is now supported, but wide character/string functions are notstrcoll
andstrxfrm
functions in<string.h>
strftime
function in<time.h>
Major changes in C95 (Amendment 1 to C90,
__STDC_VERSION__
199409L
) included:__STDC_VERSION__
macro<iso646.h>
<wchar.h>
and<wctype.h>
Major changes in C99 (
__STDC_VERSION__
199901L
) included:static
and type qualifiers in parameter array declarators<complex.h>
(optional in C11)<tgmath.h>
long long int
type and library functions<float.h>
int
#pragma lint
\u
and\U
)%a
and%A
printf/scanf conversion specifiersprintf
,scanf
, andstrtod
//
comments<inttypes.h>
and<stdint.h>
#pragma lint
intmax_t
/uintmax_t
__VA_ARGS__
)vscanf
family of functions in<stdio.h>
and<wchar.h>
<math.h>
math_errhandling
)<fenv.h>
enum
declaration%lf
conversion specifier allowed inprintf
snprintf
family of functions in<stdio.h>
<stdbool.h>
_Pragma
preprocessing operator__func__
predefined identifierva_copy
macrostrftime
conversion specifiersungetc
at the beginning of a binary filereturn
without expression not permitted in function that returns a value (and vice versa)#pragma lint
Major changes in C11 (
__STDC_VERSION__
201112L
) included:<stdatomic.h>
and<threads.h>
)_Thread_local
is supported, but multithreading is not<float.h>
)<stdalign.h>
,<stdlib.h>
)<uchar.h>
) (originally specified in ISO/IEC TR 19769:2004)<complex.h>
)<stdio.h>
)aligned_alloc
,at_quick_exit
, andquick_exit
functions (<stdlib.h>
)There were no major changes in C17 (
__STDC_VERSION__
201710L
), only technical corrections and clarifications.