[llvm] r214672 - X86: silence warning (-Wparentheses)
Akira Hatanaka
ahatanak at gmail.com
Mon Aug 4 10:14:06 PDT 2014
The clang I used to commit r214580 is based on 3.5. It's possible that this
has been fixed in a more recent clang.
Also, I think the parentheses should be around "isMask_32(STReturns) && N
<= 2" as gcc points out if it is necessary to use them (I don't think they
are needed, since '&&' has a higher precedence than '||').
On Mon, Aug 4, 2014 at 9:40 AM, David Blaikie <dblaikie at gmail.com> wrote:
> Another Clang missing case? (I doubt it - perhaps the original
> committer wasn't using a recent clang or GCC?)
>
> On Sun, Aug 3, 2014 at 4:00 PM, Saleem Abdulrasool
> <compnerd at compnerd.org> wrote:
> > Author: compnerd
> > Date: Sun Aug 3 18:00:39 2014
> > New Revision: 214672
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=214672&view=rev
> > Log:
> > X86: silence warning (-Wparentheses)
> >
> > GCC 4.8.2 points out the ambiguity in evaluation of the assertion
> condition:
> >
> > lib/Target/X86/X86FloatingPoint.cpp:949:49: warning: suggest parentheses
> around ‘&&’ within ‘||’ [-Wparentheses]
> > assert(STReturns == 0 || isMask_32(STReturns) && N <= 2);
> >
> > Modified:
> > llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
> >
> > Modified: llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp?rev=214672&r1=214671&r2=214672&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp (original)
> > +++ llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp Sun Aug 3 18:00:39
> 2014
> > @@ -946,7 +946,7 @@ void FPS::handleCall(MachineBasicBlock::
> >
> > // FP registers used for function return must be consecutive starting
> at
> > // FP0.
> > - assert(STReturns == 0 || isMask_32(STReturns) && N <= 2);
> > + assert((STReturns == 0 || isMask_32(STReturns)) && N <= 2);
> >
> > for (unsigned I = 0; I < N; ++I)
> > pushReg(N - I - 1);
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140804/ecb26e71/attachment.html>
More information about the llvm-commits
mailing list