简体   繁体   中英

What are conditional features in C standard?

This third edition cancels and replaces the second edition, ISO/IEC 9899:1999, as corrected by ISO/IEC 9899:1999/Cor 1:2001, ISO/IEC 9899:1999/Cor 2:2004, and ISO/IEC 9899:1999/Cor 3:2007. Major changes from the previous edition include:

— conditional (optional) features (including some that were previously mandatory)

Conditional (optional) features are features that are not necessary supported by C compiler implementations as for example variable length arrays or complex types.

C 2018 6.10.8.3 1 lists the conditional feature macros, which reveal the conditional features:

__STDC_ANALYZABLE__ The integer constant 1 , intended to indicate conformance to the specifications in Annex L (Analyzability).

__STDC_IEC_559__ The integer constant 1 , intended to indicate conformance to the specifications in Annex F (IEC 60559 floating-point arithmetic).

__STDC_IEC_559_COMPLEX__ The integer constant 1 , intended to indicate adherence to the specifications in Annex G (IEC 60559 compatible complex arithmetic).

__STDC_LIB_EXT1__ The integer constant 201710L , intended to indicate support for the extensions defined in Annex K (Bounds-checking interfaces).

__STDC_NO_ATOMICS__ The integer constant 1 , intended to indicate that the implementation does not support atomic types (including the _Atomic type qualifier) and the <stdatomic.h> header.

__STDC_NO_COMPLEX__ The integer constant 1 , intended to indicate that the implementation does not support complex types or the <complex.h> header.

__STDC_NO_THREADS__ The integer constant 1 , intended to indicate that the implementation does not support the <threads.h> header.

__STDC_NO_VLA__ The integer constant 1 , intended to indicate that the implementation does not support variable length arrays or variably modified types.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM