- [—std-<arg>] Determine the language standard. For
enhanced compatibility with other compilers, —std can
also be used with a single dash (i.e. -std) and with =
or _ (whitespace) as delimiter. The language
standard, specified via <arg>, can be one of the following:
- [c90] Follow
the ISO/IEC 9899 First Edition standard (ANSI C89 / ISO C90). Alternative
spellings: c89, iso9899:1990
- [c94] Follow
the ISO/IEC 9899 First Edition standard as modified in amendment 1.
Alternative spelling: c95, iso9899:199409
- [c99] Follow
the ISO/IEC 9899 Second Edition standard (ISO C99). Alternative spelling:
iso9899:1999
- [c11] Follow
the ISO/IEC 9899 Third Edition standard (ISO C11). Alternative spelling:
iso9899:2011
- [c17] Follow
the ISO/IEC 9899 Fourth Edition standard (ISO C17). Alternative spellings:
iso9899:2017, c18, iso9899:2018
- [c23] Follow
the ISO/IEC 9899 Fifth Edition standard (ISO C23). Alternative spelling:
c2x
- [c2y] Enable
features anticipated for the Sixth Edition standard (currently abbreviated
ISO C2y).
- [sdcc90]
Generally follow ANSI C89 / ISO C90, but allow some SDCC behaviour
that conflicts with the standard. Alternative spelling: sdcc89
- [sdcc99]
Generally follow ISO C99, but allow some SDCC behaviour that conflicts
with the standard.
- [sdcc11]
Generally follow ISO C11, but allow some SDCC behaviour that conflicts
with the standard (default).
- [sdcc17]
Generally follow ISO C17, but allow some SDCC behaviour that conflicts
with the standard. Alternative spelling: sdcc18
- [sdcc23]
Generally follow ISO C23, but allow some SDCC behaviour that conflicts
with the standard. Alternative spelling: sdcc2x
- [sdcc2y]
Generally follow ISO C2y, but allow some SDCC behaviour that conflicts
with the standard.
- [—fdollars-in-identifiers] Permit
'$' as an identifier character.
- [—fsigned-char] By
default char is unsigned. To set the signedness for characters
to signed, use the option --fsigned-char. If this option
is not set and no signedness keyword (unsigned/signed) is given, a
char will be unsigned. All other types are unaffected.
- [—const-stringlit] Make
string literals const.