Subsetting the C Standard

Document: N1443
Date: 2010-03-21
Author: P.J. Plauger
Related documents: WG 14/N1395
TO 6.10.8 Predefined Macro Names, para 2:
The following macro names are conditionally defined by the implementation:
__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 informative annex G (IEC 60559 compatible complex arithmetic).
__STDC_ISO_10646_ An integer constant of the form yyyymmL (for example, 199712L). If this symbol is defined, then every character in the Unicode required set, when stored in an object of type wchar_t, has the same value as the short identifier of that character. The Unicode required set consists of all the characters that are defined by ISO/IEC 10646, along with all amendments and technical corrigenda, as of the specified year and month.
ADD:
__STDC_NO_COMPLEX_ The integer constant 1, intended to indicate that the implementation shall accept only a strictly conforming program that does not use complex types.
__STDC_NO_THREADS_ The integer constant 1, intended to indicate that the implementation shall accept only a strictly conforming program that does not include the header <threads.h>.
__STDC_NO_VLA_ The integer constant 1, intended to indicate that the implementation shall accept only a strictly conforming program that does not use variable length arrays.
RATIONALE:
Two of the largest additions to C99 were complex arithmetic and variable length arrays; and the largest addition to C1X is threads. To ease conformance to C1X, and in the hopes of increasing mainstream adoption of C1X, it seems prudent to allow any or all of these three large components to be omitted in an implementation without losing the cachet of compliance. This is an intentional departure from the C89 practice of minimizing subsetting to hosted vs. freestanding.
NOTES:

The Committee may also want to make atomics (in <stdatomic.h>) optional as well, either as part of threads or as a fourth __STDC_NO_* conditional macro.

Also see the JTC 1/SC 22 plenary resolution 09-16:
Netherlands Contribution on Growth of Programming Language Standards JTC 1/SC 22, noting the discussion on SC 22 N 4484 (Netherlands Contribution on the Growth of Programming Language Standards), recommends its Working Group Conveners to distribute SC 22 N 4484 on the Growth of Programming Language Standards to their Working Groups as a JTC 1/SC 22 recommended document on guidance to address the issues identified in this document.