<div dir="ltr">The clang I used to commit r<font face="arial, sans-serif">214580 is based on 3.5. It's possible that this has been fixed in a more recent clang.</font><div><br></div><div>Also, I think the parentheses should be around "<span style="font-size:13px;font-family:arial,sans-serif">isMask_32(STReturns) && N <= 2</span>" as gcc points out if it is necessary to use them (I don't think they are needed, since '&&' has a higher precedence than '||').</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 4, 2014 at 9:40 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Another Clang missing case? (I doubt it - perhaps the original<br>
committer wasn't using a recent clang or GCC?)<br>
<div class=""><div class="h5"><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:39 2014<br>
> New Revision: 214672<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=214672&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=214672&view=rev</a><br>
> Log:<br>
> X86: silence warning (-Wparentheses)<br>
><br>
> GCC 4.8.2 points out the ambiguity in evaluation of the assertion condition:<br>
><br>
> lib/Target/X86/X86FloatingPoint.cpp:949:49: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]<br>
> assert(STReturns == 0 || isMask_32(STReturns) && N <= 2);<br>
><br>
> Modified:<br>
> llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp<br>
><br>
> Modified: llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp?rev=214672&r1=214671&r2=214672&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp?rev=214672&r1=214671&r2=214672&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp (original)<br>
> +++ llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp Sun Aug 3 18:00:39 2014<br>
> @@ -946,7 +946,7 @@ void FPS::handleCall(MachineBasicBlock::<br>
><br>
> // FP registers used for function return must be consecutive starting at<br>
> // FP0.<br>
> - assert(STReturns == 0 || isMask_32(STReturns) && N <= 2);<br>
> + assert((STReturns == 0 || isMask_32(STReturns)) && N <= 2);<br>
><br>
> for (unsigned I = 0; I < N; ++I)<br>
> pushReg(N - I - 1);<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>
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></div></div>