C language overview
The IAR C/C++ Compiler for Arm supports the INCITS/ISO/IEC 9899:2018 standard, also known as C18. C18 addresses defects in C11 (INCITS/ISO/IEC 9899:2012) without introducing any new language features. This means that the C11 standard is also supported. In IAR user documentation, the C18 standard is referred to as Standard C and is the default standard used in the compiler. This standard is stricter than C89.
The compiler will accept source code written in the C18 standard or a superset thereof. Features that belong to the C23 standard, formally ISO/IEC 9899:2024, are continuously added to the compiler. See Supported C23 features for a list of currently supported C23 features.
In addition, the compiler also supports the ISO 9899:1990 standard (including all technical corrigenda and addenda), also known as C94, C90, C89, and ANSI C. In IAR user documentation, this standard is referred to as C89. Use the ‑‑c89 compiler option to enable this standard.
With Standard C enabled, the IAR C/C++ Compiler for Arm can compile all C18/C11 source code files, except for those that depend on thread-related system header files.
The floating-point standard that Standard C binds to is IEC 60559—known as ISO/IEC/IEEE 60559—which is nearly identical to the IEEE 754 format.
Annex K (Bounds-checking interfaces) of the C standard is supported. See Bounds checking functionality.
For an overview of the differences between the various versions of the C standard, see the Wikipedia articles C18 (C standard revision), C11 (C standard revision), or C99.
Supported C23 features
The compiler accepts these C features that belong to the C23 standard, formally ISO/IEC 9899:2024:
The Attribute syntax
[[attr]]The
__has_c_attributepreprocessor conditionalThis can be used to test whether a particular attribute is supported or not.
The standard attributes
[[deprecated]],[[nodiscard]],[[maybe_unused]],[[fallthrough]], and[[noreturn]]