tags:

views:

221

answers:

2

I have a thread but unfortunately none of the suggestions are working for me http://stackoverflow.com/questions/475407/make-one-gcc-warning-an-error

in my makefile i specify -Werror=uninitialized, no errors occur. I changed it to -Wuninitialized and i see my warning, -Wno-uninitialized makes it go away as expected, but why isnt -Werror=uninitialized working?

Also it was suggested in code i write

#pragma GCC diagnostic error "-Wuninitialized"

that does not work either. Why?

A: 

What version of gcc are you using? Does that version support the -Werror=uninitialized command line option?

Greg Hewgill
this is the devkitpro modified mingw gcc. i am not sure how to check it but it does have std::tr1::shared_ptr in the headers. So far it appeared to be the same as normal gcc compilers.
acidzombie24
Still, what version are you using? Use gcc -v to find out.
Martin v. Löwis
+1  A: 

you should use -Werror

This option has no parameters (it is an on/off switch)

But it is good practice to remove all Warnings, so -Werror enforces this good practice.

Peter Miehle