[llvm] r182832 - Temporary fix to get rid of gcc warning.

David Blaikie dblaikie at gmail.com
Wed May 29 11:50:27 PDT 2013


On Wed, May 29, 2013 at 11:44 AM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> > Generally we prefer to simply disable or fix bad warnings rather than
> > workaround them in code. (which usually amounts to disabling GCC warnings
> > and fixing Clang warnings)
> >
> > Which warning was the problem here & can we just disable it? Does Clang
> have
> > an equivalent (& better/correct/not-false-positive-on-this-code) warning?
>
> I think it was a valid warning about the comparison always being true
>

The statement the warning makes is correct, that doesn't necessarily make
it a good thing to warn on (there are lots of correct statements a compiler
can make about teh code that aren't warnings for good reason). In this case
I assume/think the comparison was based on expressions that can vary
per-build even if they're constant for each specific invocation. It doesn't
seem great but I haven't looked carefully.


> and if remember the email correctly it actually found a bug on the
> enum values they use.


That would be interesting to know.

(it'd be helpful if any such celanup commits had more information about
what they were cleaning up - this isn't just related to this commit but
several others (by other people too) in the last day or two. "revert blah"
or "suppress warning", etc... )


> Vincent?
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130529/e8d2d5be/attachment.html>


More information about the llvm-commits mailing list