C Standard Compatibility Checker for C89, C99, C11 and C17
This checker lists 16 reviewed C language and library features and shows whether each one is accepted by -std=c89, -std=c99, -std=c11 and -std=c17. Every feature has a runnable fixture and a probe that shows what an older standard reports, so you can see exactly why code that builds on one machine fails on another.
How to use the checker
Choose a standard to list only the features its -std flag accepts, or narrow the list by category.
Select a feature to read what it does, the minimum flag and any portability caveat.
Switch between the runnable fixture and the older-standard probe to compare representative GCC output.
Load the program into the C compiler with one click, or copy it to compile locally with the shown command.
Interactive C89 vs C99 vs C11 vs C17 matrix
Filter reviewed C language features by standard or category, see which -std= flag accepts each one, then load the runnable fixture — or a probe demonstrating rejection or an implementation extension — into the compiler.
16 features reviewed
Feature
C89/C90-std=c89
C99-std=c99
C11-std=c11
C17-std=c17
—Not available
✓Supported
✓Supported
✓Supported
—Not available
✓Supported
✓Supported
✓Supported
—Not available
✓Supported
✓Supported
✓Supported
—Not available
✓Supported
✓Supported
✓Supported
—Not available
✓Supported
?Optional
?Optional
—Not available
✓Supported
✓Supported
✓Supported
—Not available
✓Supported
✓Supported
✓Supported
—Not available
✓Supported
✓Supported
✓Supported
—Not available
—Not available
✓Supported
✓Supported
—Not available
—Not available
✓Supported
✓Supported
—Not available
—Not available
✓Supported
✓Supported
—Not available
—Not available
✓Supported
✓Supported
—Not available
—Not available
✓Supported
✓Supported
—Not available
—Not available
?Optional
?Optional
✓Supported
!Deprecated
✗Removed
✗Removed
—Not available
—Not available
—Not available
✓Supported
Show the -std=c99 / c11 / c17 lanes diagram
_Generic type-generic macros
Added in C11 · minimum flag -std=c11
_Generic picks an expression at compile time from the type of its controlling argument — the basis for type-generic macros like <tgmath.h>.
gcc -std=c11 -pedantic-errors -Wall -Wextra main.c -o main
$ gcc -std=c11 -pedantic-errors -Wall -Wextra main.c -o main && ./main
int
double
char *
Compiled without diagnostics · exit code 0
Representative GCC output, not a live run. Diagnostic wording, line and column numbers vary between compiler versions.
Interactive C struct Memory Alignment, Byte Padding & sizeof() Calculator
Inspect how a 64-bit C compiler (LP64 ABI) aligns struct members in memory, where internal and tail padding bytes are inserted, how #pragma pack(1) eliminates padding, and how reordering fields from largest to smallest alignment shrinks sizeof(struct).
Interleaving 1-byte char members with 4-byte int and 8-byte double members forces 10 bytes of internal alignment padding on 64-bit LP64 (24 bytes total for 14 bytes of raw data).
Optimization insight: Reordering members from largest alignment (8B double) to smallest (1B char) shrinks sizeof(struct SensorPacket) from 24 bytes to 16 bytes — saving 8 bytes (33%) per struct.
GCC and Clang accept the same -std spellings. Add -pedantic-errors so a construct the chosen standard does not allow stops the build instead of compiling as an extension.
Standard
Document
GCC/Clang flag
__STDC_VERSION__
Main changes
C89/C90
ANSI X3.159-1989 / ISO/IEC 9899:1990
-std=c89
not defined
ANSI C / ISO C90: declarations only at the top of a block, /* */ comments only, no long long.
How do I compile C code with a specific C standard?
Pass -std to GCC or Clang, for example gcc -std=c11 -pedantic-errors main.c -o main. The flags -std=c89 (also c90), -std=c99, -std=c11 and -std=c17 (also c18) select ISO C; the gnu89, gnu99, gnu11 and gnu17 forms add GNU extensions. Add -pedantic-errors to turn standard violations into errors.
What does "Optional" mean in the compatibility matrix?
C11 lets an implementation omit some features. For example, variable-length arrays became optional (an implementation without them defines __STDC_NO_VLA__) and <threads.h> is optional (__STDC_NO_THREADS__). Check the macro before relying on such a feature.
Is the terminal output a live compiler run?
No. Each fixture and probe was compiled locally with GCC and its first diagnostic recorded. Wording, line and column numbers vary between compiler versions. Use the load button to run the program in the online compiler with its current settings, and compile locally with the shown command to reproduce a probe.
Which C standard does GCC use by default?
It depends on the GCC release, and the default is a GNU dialect rather than strict ISO C: GCC 5 to 10 default to gnu11, GCC 11 to 14 to gnu17, and GCC 15 to gnu23. Pass an explicit -std flag so a build behaves the same on every machine.