-
Notifications
You must be signed in to change notification settings - Fork 0
๐ Compiler C Standard Detection
Feldwor edited this page Oct 30, 2021
·
5 revisions
// Comments on your silly C compiler
// #if __STDC_VERSION__ == 201112L
// #error C11 compiler is too old, use newer standard Compiler
//
// #endif
#if __STDC_VERSION__ == 199901L
#error You are using C99 compiler that is considered too old. Switch to C11 Standard or Newer. (std=C11)
#endif
#if __STDC_VERSION__ < 199901L
#error Sucky compiler, use C11 Standard Compiler or newer.
#endif
#include <stdio.h>
int main(){
printf("C Standard Version: %i\n" ,__STDC_VERSION__);
}
C:\Users\user\Desktop>tcc -run test.c
C Standard Version: 199901
C:\Users\user\Desktop>tcc -std=c99 -run test.c
C Standard Version: 201112
C:\Users\user\Desktop>tcc -std=c11 -run test.c
C Standard Version: 201112
TutorialsPoint Reference for C standard library is always useful.
https://www.tutorialspoint.com/c_standard_library/index.htm
General C language overview can be found on Geeks for Geeks.
https://www.geeksforgeeks.org/c-programming-language/
Advanced In-depth book on C language.
Extreme C: Taking you to the limit in Concurrency, OOP, and the most advanced capabilities of C
Quick simplistic tutorials on C language can be found here.
https://www.tutorialspoint.com/cprogramming/index.htm
https://www.programiz.com/c-programming
Learning and Reference of C language.
Public Domain.
Also available in CC0 or MIT License.