<div class="gmail_quote">On Mon, Oct 25, 2010 at 2:47 PM, Andy Trick <span dir="ltr"><<a href="mailto:atrick@apple.com">atrick@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
This is the second time someone reported a warning that my build doesn't report. Of course, I want to keep the build warning-clean, but I'm not sure how to do better since the makefiles already set -Wall -pedantic (and several other -W's). Is this because I'm running a newer gcc (4.2.1) than linux developers?</blockquote>
<div><br></div><div>Quite the opposite, 4.2.1 is much older than most Linux GCCs. GCC is on 4.4 now, and 4.5 isn't that far away.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
 (gcc really should be smart enough to know this isn't a bug.)<br></blockquote><div><br></div><div>The flow control may have been the same here, but in general it looked like a bug. The only reason this wasn't a bug is because the string constant is always true...</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<font color="#888888"><br>
-Andy<br>
</font><div><div></div><div class="h5"><br>
On Oct 23, 2010, at 12:46 AM, Chandler Carruth wrote:<br>
<br>
> Author: chandlerc<br>
> Date: Sat Oct 23 02:46:14 2010<br>
> New Revision: 117199<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=117199&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=117199&view=rev</a><br>
> Log:<br>
> Fix a likely bug in an assertion by adding parentheses around '||'. This bug<br>
> was found by a GCC warning. ;]<br>
><br>
> Modified:<br>
>    llvm/trunk/lib/CodeGen/LiveIntervalUnion.cpp<br>
><br>
> Modified: llvm/trunk/lib/CodeGen/LiveIntervalUnion.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalUnion.cpp?rev=117199&r1=117198&r2=117199&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalUnion.cpp?rev=117199&r1=117198&r2=117199&view=diff</a><br>

> ==============================================================================<br>
> --- llvm/trunk/lib/CodeGen/LiveIntervalUnion.cpp (original)<br>
> +++ llvm/trunk/lib/CodeGen/LiveIntervalUnion.cpp Sat Oct 23 02:46:14 2010<br>
> @@ -25,7 +25,7 @@<br>
>   // Add this live virtual register to the union<br>
>   LiveVirtRegs::iterator pos = std::upper_bound(lvrs_.begin(), lvrs_.end(),<br>
>                                                 &lvr, less_ptr<LiveInterval>());<br>
> -  assert(pos == lvrs_.end() || *pos != &lvr && "duplicate LVR insertion");<br>
> +  assert((pos == lvrs_.end() || *pos != &lvr) && "duplicate LVR insertion");<br>
>   lvrs_.insert(pos, &lvr);<br>
>   // Insert each of the virtual register's live segments into the map<br>
>   SegmentIter segPos = segments_.begin();<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>
<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>
</div></div></blockquote></div><br>