Emergent language features shall not be used
Emergent language features shall not be used.
Some new language features in the C11 Standard have undefined, unspecified or implementation-defined behavior. These features might also exhibit well-defined behavior that defies developer expectations. Though rule 1.3 and directive 1.1 prohibits undefined and implementation-defined behavior, to avoid well-defined behavior that defies expectations, some language features are summarily discouraged using rule 1.4.
The rule forbids use of the following language features:
The _Generic operator.
The _Noreturn function specifier and the
<stdnoreturn.h> header file
The _Atomic type specifier and the facilities provided by
<stdatomic.h> (for instance, the macros beginning with
ATOMIC_ and functions beginning with atomic_
implemented as macros in <stdatomic.h>).
The _Thread_local storage class specifier and the facilities
provided by <threads.h> (for instance, types such as
thrd_t and functions such as
thrd_create).
The _Alignas alignment specifier, the
_Alignof operator and the <stdalign.h>
header file, and facilities therein (such as the alignas and
alignof macros).
All facilities in Annex K of the C11 Standard about 'Bound-checking interfaces',
other than defining __STDC_WANT_LIB_EXT1__ to '0'
If you expect a rule violation but do not see it, refer to the documentation of Polyspace® Code Prover™ or Polyspace Code Prover Server™.
| Group: Standard C Environment |
| Category: Required |
| AGC Category: Required |