[llvm-commits] -Wno-maybe-uninitialized not working right with gcc-4.3

Duncan Sands baldrick at free.fr
Tue Jan 15 04:53:55 PST 2013


Hi David, your -Wno-maybe-uninitialized changes broke one of my buildbots.
The reason is that gcc-4.3 accepts this flag, however if any kind of warning
is produced then it errors out saying it doesn't know -Wno-maybe-uninitialized.

For example, suppose empty.cpp is an empty file, and warn.cpp contains:

   int foo(int x, unsigned y) {
     return x == y;
   }

Then:

$ gcc -S empty.cpp -Wall -Wno-maybe-uninitialized
$ gcc -S warn.cpp -Wall -Wno-maybe-uninitialized
warn.cpp: In function ‘int foo(int, unsigned int)’:
warn.cpp:2: warning: comparison between signed and unsigned integer expressions
At global scope:
cc1plus: error: unrecognized command line option "-Wno-maybe-uninitialized"
$

This is clearly a gcc bug.  I don't know what the right approach to solving
this is though, any suggestions?

Ciao, Duncan.



More information about the llvm-commits mailing list