Names specified here
Name Description Notes Source Availability
__STDC__ Indicator of conforming implementation L M Predefined C89 C90 C95 C99 C11
__STDC_VERSION__ Standard version identifier L M Predefined C95 C99 C11
Name Standard Number of headers Number of names Expansion of __STDC_VERSION__
C89 ANSI X3.159-1989 15 323 undefined
C90 ISO/IEC 9899-1990 15 323 undefined
C95 ISO/IEC 9899-1995 18 416 199409L
C99 ISO/IEC 9899-1999 24 1058 199901L
C11 ISO/IEC 9899-2011 29 1308 201112L

__STDC__ expands to 1 on all conforming implementations of C. From C95, __STDC_VERSION__ expands to an integer constant of the form yyyymmL, indicating the year yyyy and month mm in which the standard was published. 201112L indicates C11, 199901L indicates C99, and 199409L indicates C95. Its absence indicates C89 or C90. Whatever the value, if you need to detect a minimum version, compare numerically. For example:

#if __STDC_VERSION__ > 199409L
/* C95 or later detected */
#elif __STDC__
/* C90 detected */
#else
/* Substandard implementation detected */
#endif

CHaR
Sitemap Supported
Site format updated 2024-06-05T22:37:07.391+0000
Data updated 1970-01-01T00:00:00.000+0000
Page updated 2023-10-04T20:24:03.209+0000