Use —std-c23 to compile
in this mode.
Deviations from standard compliance:
- initialization of structure arrays must be fully braced.
struct s { char x } a[] = {1, 2}; /* invalid
in SDCC */
struct s { char x } a[] = {{1}, {2}}; /* OK
*/
- 'double' precision floating point not
supported. Instead a warning is emitted, and float is used instead.
long double is treated the same.
- Compound literals are not supported.
- Support for attributes is slightly incomplete.
- Checked integer arithmetic is not supported for (unsigned) long long.
- Qualifier-preserving standard library functions are not implemented.
- Enhanced enumerations are not implemented.
- constexpr is not implemented.
Some features of this standard are not supported in some ports:
- pic14, pic16: structures and unions cannot
be passed as function parameters; hc08, s08, mos6502, pic14, pic16:
they cannot be a return value from a function,
e.g.:
struct s { ... };
struct s foo1 (struct
s parms) /* invalid in SDCC although allowed in ANSI */
{
struct s rets;
...
return rets; /* is invalid in SDCC although allowed
in ANSI */
}
- mcs51, ds390, hc08, s08, pdk13, pdk14, pdk15 and mos6502 ports: functions
are not reentrant unless explicitly declared as such or --stack-auto
is specified.
- pic14, pic16: 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.
- pic14, pic16: _BitInt is not supported.