Standard compliance - roybaer/sdcc-wiki GitHub Wiki

Table of Contents

ISO C90 / ANSI C89

Use --std-c89 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.
  • K & R style function declarations.
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 / ISO C 94

Use --std-c95 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.
  • K & R style function declarations.
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.
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.
  • 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 ds390, pic14 and pic16 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.
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.
  • 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 ds390, pic14 and pic16 ports.

Embedded C

SDCC supports Embedded C named address spaces, both intrinsic (depending on the port) and user-defined. The fixed-point math support in the pic ports is not standard-compliant. Other parts of the standard are not supported.

⚠️ **GitHub.com Fallback** ⚠️