cgcc

When compiling using -std=c99 do I need to use -pedantic or -ansi?


I'm C/GCC noob, sorry. Thank you.


Solution

  • Using -ansi is equivalent to using -std=c89 or -std=c++98 depending on whether you're compiling a C or C++ file, so you would not want to use it along with -std=c99 as it would conflict. -pedantic on the other hand is independent of -std so can be used along with it.