Authors: Jay Ghiron
Date: 2026-09-17
Submitted against: C23
Status: Open
Consider the following two macros:
The macro
__STDC_VERSION_ASSERT_H__is an integer constant expression with a value equivalent to
202311L.
(C23 7.2.1 "General" paragraph 4.)
The feature test macro
__STDC_VERSION_FENV_H__expands to the token202311L.
(C23 7.6.1 "General" paragraph 5.)
These two macros are specified differently, the former requiring a
particular value while the latter requires an exact sequence of
tokens. Is there any reason to specify these differently? Outside of
preprocessing, the only observable difference is that the type of the
former might not be long. The following are all macros specified
with an exact sequence of tokens of the form yyyymmL:
__STDC_VERSION____STDC_ISO_10646____STDC_IEC_60559_BFP____STDC_IEC_60559_DFP____STDC_IEC_60559_COMPLEX____STDC_IEC_60559_TYPES____STDC_LIB_EXT1____STDC_VERSION_FENV_H____STDC_VERSION_MATH_H____STDC_VERSION_STDINT_H____STDC_VERSION_STDLIB_H____STDC_VERSION_TGMATH_H____STDC_VERSION_TIME_H__The following are all macros specified to be integer constant
expressions with the same value as an integer constant of the form
yyyymmL:
__STDC_VERSION_ASSERT_H____STDC_VERSION_COMPLEX_H____STDC_VERSION_FLOAT_H____STDC_VERSION_INTTYPES_H____STDC_VERSION_LIMITS_H____STDC_VERSION_SETJMP_H____STDC_VERSION_STDARG_H____STDC_VERSION_STDATOMIC_H____STDC_VERSION_STDBIT_H____STDC_VERSION_STDCKDINT_H____STDC_VERSION_STDDEF_H____STDC_VERSION_STDIO_H____STDC_VERSION_STRING_H____STDC_VERSION_UCHAR_H____STDC_VERSION_WCHAR_H__C2Y also adds __STDC_VERSION_STDCOUNTOF_H__ and
__STDC_VERSION_STDMCHAR_H__ which are defined by value rather than a
specific sequence of tokens.