[LLVMdev] Build Failure

greened at obbligato.org greened at obbligato.org
Wed Jan 2 20:37:45 PST 2013

Chandler Carruth <chandlerc at google.com> writes:

> The implementations of -Wuninitialized, -Wreturn-type, and a few other
> GCC warnings are extremely aggressive. They have high false positive
> rates with few benefits. We regularly keep -Wreturn-type working
> despite this (see all of the llvm_unreachable after switch
> statements), 

So why not add -Wno-uninitialized and friends to the command line?

It seems a better option than simply ignoring warnings and then missing
a real bug in the haystack of warning messages.

> but the fix to silence GCC's -Wuninitialized false positives actively
> degrades the quality of the code -- it forces dead stores to
> variables. These dead stores are a waste and prevent tools like
> Valgrind from finding very real bugs in the logic which cause a
> variable to be left uninitialized.

I'm curious about this statement.  Can you give an example?  I've
committed fixes to lots of -Wuninitialized warnings in my tree.  It's
all just initializing local variables, which shouldn't result in extra


More information about the llvm-dev mailing list