What gcc options shall I use to enforce ANSI C (C99) warnings/errors?
gcc (GCC) 3.4.2 (mingw-special)
I’m using:
gcc -pedantic -ansi -std=c99
is this correct?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
-ansiflag is synonymous with the-std=c89flag.Just using
-std=c99with-pedanticshould be sufficient.When in doubt, you can always refer to the GCC documentation. As of GCC 3.4.2, the chapter to read is 2 – Language Standards Supported by GCC.