-
Recent Posts
Recent Comments
Categories
Links
Daily Archives: March 28, 2018
gcc flags about c standard
以gcc 5.1.0為例 https://gcc.gnu.org/onlinedocs/gcc-5.1.0/gcc/Standards.html The default, if no C language dialect options are given, is -std=gnu11. 如果要採用c89(or c90) 可使用下面的選項之一 -ansi -std=c89 -std=c90 -std=iso9899:1990 這樣會關掉一些gnu extension 如果要對應C標準的要求 則再加上 -pedantic or -pedantic-errors 即 -std=c89 -pedantic
Posted in C Language
Leave a comment