[LLVMdev] Build Failure
dag at cray.com
dag at cray.com
Thu Jan 3 08:22:05 PST 2013
"Caldarale, Charles R" <Chuck.Caldarale at unisys.com> writes:
>> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
>> On Behalf Of greened at obbligato.org
>> Subject: Re: [LLVMdev] Build Failure
>
>> It seems a better option than simply ignoring warnings and then missing
>> a real bug in the haystack of warning messages.
>
> Definitely agree with that. Our project coding standards require
> _zero_ warnings at commit time (but that only applies to our code, not
> imported libraries).
So how did these slip in?
>> 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 stores.
>
> What do you think the initialization is? Something has to write the
> initial value, and that write is frequently pointless.
It's most likely a store to a register. That's hardly a performance
issue. Even a store to the stack has little effect.
Really, we're going to ignore errors because we can't afford one store
in initialization code?
> The real problem with this specific warning is that gcc doesn't
> properly track that a variable is used only under the same conditions
> in which it is set.
That is not always true in the cases I've found. That's the consequence
of ignoring warnings.
-David
More information about the llvm-dev
mailing list