Difference between revisions of "Standard compliance"

From SDCC wiki
Jump to: navigation, search
(ISO C11)
(ISO C11)
(2 intermediate revisions by one user not shown)
Line 30: Line 30:
 
* Variable-length arrays.
 
* Variable-length arrays.
 
* Integer constants and modulo for long long, unsigned long long, int_fast64_t, int_least64_t, int64_t, uint_fast64_t, uint_least64_t, uint64_t.
 
* Integer constants and modulo for long long, unsigned long long, int_fast64_t, int_least64_t, int64_t, uint_fast64_t, uint_least64_t, uint64_t.
* Float classification macros in float.h.
+
* Float classification macros in math.h.
  
 
Not yet implemented in some ports:
 
Not yet implemented in some ports:
Line 46: Line 46:
 
* Compound literals.
 
* Compound literals.
 
* Integer constants and modulo for long long, unsigned long long, int_fast64_t, int_least64_t, int64_t, uint_fast64_t, uint_least64_t, uint64_t.
 
* Integer constants and modulo for long long, unsigned long long, int_fast64_t, int_least64_t, int64_t, uint_fast64_t, uint_least64_t, uint64_t.
* Float classification macros in float.h (C11 requires more than C99).
+
* Float classification macros in math.h (C11 requires more than C99).
* _Alignas alignment specifier.
+
 
* Type-generic expressions.
 
* Type-generic expressions.
 
* Improved Unicode support.
 
* Improved Unicode support.
* gets_s().
 
* Static assertions.
 
* quick_exit().
 
  
 
Not yet implemented in some ports:
 
Not yet implemented in some ports:

Revision as of 13:22, 4 April 2013

Contents

ISO C90 and ANSI C89

Use --std-c89 to compile in this mode.

Not yet implemented in sdcc:

  • Data type double.
  • Structures and unions can not be assigned, passed as function parameters or return values.
  • Diagnosis for qualifiers occuring multiple times in qualifier-specifier lists (sdcc always behaves according to the C99 standard in this respect).

Not yet implemented in some ports:

  • Functions are not reentrant unless explicitly declared as such or --stack-auto is specified in the mcs51, hc08 and s08 ports.

ISO C95

Not yet implemented in sdcc:

  • Data type double.
  • Structures and unions can not be assigned, passed as function parameters or return values.
  • Diagnosis for qualifiers occuring multiple times in qualifier-specifier lists (sdcc always behaves according to the C99 standard in this respect).

Not yet implemented in some ports:

  • Functions are not reentrant unless explicitly declared as such or --stack-auto is specified in the mcs51, hc08 and s08 ports.

ISO C99

Use --std-c99 to compile in this mode.

Not yet implemented in sdcc:

  • Data type double, long double.
  • Structures and unions can not be assigned, passed as function parameters or return values.
  • Intermingled declarations and code (variable declaration no longer restricted to file scope or the start of a compound statement (block)).
  • Compound literals.
  • Variable-length arrays.
  • Integer constants and modulo for long long, unsigned long long, int_fast64_t, int_least64_t, int64_t, uint_fast64_t, uint_least64_t, uint64_t.
  • Float classification macros in math.h.

Not yet implemented in some ports:

  • Support for _Bool / bool is incomplete (no pointers to bool, or bool inside a struct) in the mcs51, ds390 and xa51 ports.
  • Functions are not reentrant unless explicitly declared as such or --stack-auto is specified in the mcs51, hc08 and s08 ports.
  • There is no support for data types long long, unsigned long long, int_fast64_t, int_least64_t, int64_t, uint_fast64_t, uint_least64_t, uint64_t in the mcs51, ds390, ds400, pic14, pic16 and xa51 ports.

ISO C11

Use --std-c11 to compile in this mode.

Not yet implemented in sdcc:

  • Data type double, long double.
  • Structures and unions can not be assigned, passed as function parameters or return values.
  • Intermingled declarations and code (variable declaration no longer restricted to file scope or the start of a compound statement (block)).
  • Compound literals.
  • Integer constants and modulo for long long, unsigned long long, int_fast64_t, int_least64_t, int64_t, uint_fast64_t, uint_least64_t, uint64_t.
  • Float classification macros in math.h (C11 requires more than C99).
  • Type-generic expressions.
  • Improved Unicode support.

Not yet implemented in some ports:

  • Support for _Bool / bool is incomplete (no pointers to bool, or bool inside a struct) in the mcs51, ds390 and xa51 ports.
  • Functions are not reentrant unless explicitly declared as such or --stack-auto is specified in the mcs51, hc08 and s08 ports.
  • There is no support for data types long long, unsigned long long, int_fast64_t, int_least64_t, int64_t, uint_fast64_t, uint_least64_t, uint64_t in the mcs51, ds390, ds400, pic14, pic16 and xa51 ports.

Embedded C

While sdcc supports some of this standard's features (e.g. fixed-point math on the pic port, named address spaces in the mcs51 port) it does so in a way inconsistent with the standard. Standard-compliant named address spaces are currently supported for bank-switching of data memory only.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox