<div dir="ltr">I filed <a href="http://llvm.org/bugs/show_bug.cgi?id=20536">http://llvm.org/bugs/show_bug.cgi?id=20536</a> for this.  Short story, macros.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 4, 2014 at 9:39 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Any idea if this warning showed up with Clang too?<br>
<br>
Richard - any idea why (if not) this doesn't show up with Clang?<br>
<br>
On Sun, Aug 3, 2014 at 4:00 PM, Saleem Abdulrasool<br>
<<a href="mailto:compnerd@compnerd.org">compnerd@compnerd.org</a>> wrote:<br>
> Author: compnerd<br>
> Date: Sun Aug  3 18:00:38 2014<br>
> New Revision: 214671<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=214671&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=214671&view=rev</a><br>
> Log:<br>
> CodeGen: silence a warning<br>
><br>
> GCC 4.8.2 objects to the tautological condition in the assert as the unsigned<br>
> value is guaranteed to be >= 0.  Simplify the assertion by dropping the<br>
> tautological condition.<br>
><br>
> Modified:<br>
>     llvm/trunk/lib/CodeGen/MachineCombiner.cpp<br>
><br>
> Modified: llvm/trunk/lib/CodeGen/MachineCombiner.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCombiner.cpp?rev=214671&r1=214670&r2=214671&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCombiner.cpp?rev=214671&r1=214670&r2=214671&view=diff</a><br>

> ==============================================================================<br>
> --- llvm/trunk/lib/CodeGen/MachineCombiner.cpp (original)<br>
> +++ llvm/trunk/lib/CodeGen/MachineCombiner.cpp Sun Aug  3 18:00:38 2014<br>
> @@ -144,8 +144,7 @@ MachineCombiner::getDepth(SmallVectorImp<br>
>            InstrIdxForVirtReg.find(MO.getReg());<br>
>        if (II != InstrIdxForVirtReg.end()) {<br>
>          // Operand is new virtual register not in trace<br>
> -        assert(II->second >= 0 && II->second < InstrDepth.size() &&<br>
> -               "Bad Index");<br>
> +        assert(II->second < InstrDepth.size() && "Bad Index");<br>
>          MachineInstr *DefInstr = InsInstrs[II->second];<br>
>          assert(DefInstr &&<br>
>                 "There must be a definition for a new virtual register");<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>