At the time of writing, the
C17 standard, officially named
ISO/IEC 9899:2018, is the last published C standard. It replaces the C11 standard, does not introduce new features, and fixes defects reported for C11. The
__STDC_VERSION__ macro for this standard has the value of
201710L. To compile for a C17 standard, we include the
-stdc=17 flag. Example:
gcc -Wall source.c -std=c17 -pedantic
The C17 standard is sometimes also referred to as the C18 standard. The C17 standard will be replaced by the upcoming standard, informally referred to as the C2X standard.