Skip to content

Instantly share code, notes, and snippets.

@RealDyllon
Last active November 14, 2020 09:41
Show Gist options
  • Save RealDyllon/16bd7d97edba8e97c9fd1acc176c59ff to your computer and use it in GitHub Desktop.
Save RealDyllon/16bd7d97edba8e97c9fd1acc176c59ff to your computer and use it in GitHub Desktop.
Print C Version Compiler Support
#if defined(__STDC__)
printf("Supports C89\n");
# if defined(__STDC_VERSION__)
printf("Supports C90\n");
# if (__STDC_VERSION__ >= 199409L)
printf("Supports C94\n");
# endif
# if (__STDC_VERSION__ >= 199901L)
printf("Supports C99\n");
# endif
# if (__STDC_VERSION__ >= 201710L)
printf("Supports C18\n");
# endif
# endif
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment