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

Eric Christopher echristo at gmail.com
Tue Jan 15 08:59:17 PST 2013


That sounds weird and buggy, that said, checking the version should work.

David: do you mind reverting your patch temporarily to get Duncan's bots
green while you look into it (if it'll be more than another hour or two)?

Thanks!

-eric


On Tue, Jan 15, 2013 at 8:48 AM, <dag at cray.com> wrote:

> Duncan Sands <baldrick at free.fr> writes:
>
> > 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?
>
> Grr...I wonder if this is a general problem with pre-4.6 gcc or only
> this specific version.
>
> I could check the gcc version and if it is pre-4.7 use
> -Wno-uninitialized.
>
>                                    -David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130115/51fdd26c/attachment.html>


More information about the llvm-commits mailing list