I would like to have my warnings set to the highest level using Microsoft Visual C++ compiler. Similar to using -pedantic on gcc. What compiler switches do you use to have the most warnings enabled?
Share
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 highest warning level on Visual C++ is /Wall. The warning level can also be set numerically with /W0, /W1, … /W4 to generate increasing levels of warnings.
The compiler will also check for 64 bit portability issues with /Wp64.
And you can tell it to treat warnings as errors with /WX
Visual C++ doesn’t seem to have an real equivalent to -pedantic – which is asking gcc to report all warnings required to be reported by the ISO C and C++ standards.