[OS]/Embedded&Linux

Status of C99 features in GCC 4.2

하늘을닮은호수M 2007. 8. 14. 17:20
반응형

Status of C99 features in GCC 4.2

This table is based on the list in the foreword to the printed standard ISO/IEC 9899:1999 (E), as amended by ISO/IEC 9899:1999/Cor.1:2001 (E) and ISO/IEC 9899:1999/Cor.2:2004 (E).

Where "Library Issue" is listed in conjunction with some other status, this means that some compiler support is needed for the library support, or desirable in conjunction with it. Note that the headers required of conforming freestanding implementations (clause 4 paragraph 6) do not count as library issues.

This page describes the C99 support in GCC 4.2. Information on C99 support in mainline CVS GCC is also available.

See below the table for further notes on some issues.

FeatureLibrary IssueDoneBrokenMissing
restricted character set support via digraphs and
(originally specified in AMD1)
Done
wide character library support in
and (originally specified in AMD1)
Library IssueMissing
more precise aliasing rules via effective typeDone
restricted pointersDone
variable-length arraysBroken
flexible array membersDone
static and type qualifiers
in parameter array declarators
Done
complex (and imaginary) support in Broken
type-generic math macros in Library IssueDone
the long long int type and library functionsDone
increased minimum translation limitsDone
additional floating-point characteristics
in
Done
remove implicit intDone
reliable integer divisionDone
universal character names (u and U)Done
extended identifiersMissing
hexadecimal floating-point constants and %a
and %A printf/scanf conversion specifiers
Library IssueDone
compound literalsDone
designated initializersDone
// commentsDone
library functions in Library Issue
extended integer types in Missing
remove implicit function declarationDone
preprocessor arithmetic
done in intmax_t/uintmax_t
Done
mixed declarations and codeDone
new block scopes for selection
and iteration statements
Done
integer constant type rulesDone
integer promotion rulesDone
macros with a variable number of argumentsDone
the vscanf family of functions in
and
Library IssueDone
additional math library functions in Library IssueMissing
floating-point environment access
in
Library Issue
IEC 60559 (also known as
IEC 559 or IEEE arithmetic) support
Broken
trailing comma allowed in enum declarationDone
%lf conversion specifier
allowed in printf
Library IssueDone
inline functionsBroken
the snprintf family of functions in Library IssueDone
boolean type in Done
idempotent type qualifiersDone
empty macro argumentsDone
new struct type compatibility
rules (tag compatibility)
Done
additional predefined macro namesMissing
_Pragma preprocessing operatorDone
standard pragmasMissing
__func__ predefined identifierDone
va_copy macroDone
additional strftime conversion specifiersLibrary IssueDone
deprecate ungetc at the
beginning of a binary file
Library Issue
remove deprecation of
aliased array parameters
Done
conversion of array to pointer not limited to lvaluesDone
relaxed constraints on aggregate
and union initialization
Done
relaxed restrictions on portable header namesDone
return without expression not permitted in
function that returns a value (and vice versa)
Done
FeatureLibrary IssueDoneBrokenMissing

Further notes

  • cpp has limited support for multibyte character sets.
  • IEC 60559 is IEEE 754 floating point. This works if and only if the hardware is perfectly compliant, but GCC does not define __STDC_IEC_559__ or implement the associated standard pragmas; nor do some options such as -frounding-math to enable the pragmas globally work in all cases (for example, required exceptions may not be generated) and contracting expressions (e.g., using fused multiply-add) is not restricted to source-language expressions as required by C99.
  • Compiler support is needed for math_errhandling; see messages 1, 2, 3 on this subject to libc-hacker.
  • GCC doesn't have wprintf, wscanf and wcsftime format checking support.
  • Complex numbers support does not follow all the requirements of Annex G and multiplication and division have excess overflows both in constant folding and at runtime. GCC wrongly promotes both operands of an operation between complex and real values to a complex type. Complex numbers support has not been checked in detail against the requirements of the C99 standard.
  • C99 inline functions do not generate an external definition if declared without extern, but do if declared with extern, the opposite of GCC's handling of inline and extern inline. This will probably require existing glibc headers to be fixincluded.
  • Some details of variable length arrays (VLAs) relating to when size expressions are evaluated and when the memory for VLAs is freed are not implemented, and other details are not checked against the requirements of the C99 standard.
  • const-qualified compound literals could share storage with each other and with string literals, but currently don't.
  • The information provided by static in parameter array declarators is not used for optimization. It might make sense to use it in future in conjunction with work on prefetching.
  • Some changes in TC2 may not have been implemented.
  • The list above differs from that in the C99 standard (as amended by TC1) as follows: "LIA compatibility annex" is removed, since it refers to C99's conformance to another standard rather than something for C implementations to do. The and entries have been separated, but are a single entry in C99.
반응형

'[OS] > Embedded&Linux' 카테고리의 다른 글

[명령어] dtrace로 실시간 IO 체크 - Solaris 10 -  (0) 2007.08.17
svn-howto  (0) 2007.08.15
[펌]Fedora Core 6 -> 7 Upgrade  (0) 2007.08.13
Fedora Core를 한단계 업그레이드 해보자 (Core 6 to C..  (0) 2007.08.13
mysql 설정  (0) 2007.08.10