[llvm-commits] [llvm] r51115 - in /llvm/trunk/lib/CodeGen/SelectionDAG: ScheduleDAG.cpp ScheduleDAGRRList.cpp SelectionDAGISel.cpp
Neil Booth
neil at daikokuya.co.uk
Wed May 14 15:10:45 PDT 2008
Chris Lattner wrote:-
>
> On May 14, 2008, at 1:51 PM, Dale Johannesen wrote:
>
> >
> > On May 14, 2008, at 1:43 PM, Chris Lattner wrote:
> >
> >> On May 14, 2008, at 1:07 PM, Evan Cheng wrote:
> >>> URL: http://llvm.org/viewvc/llvm-project?rev=51115&view=rev
> >>> Log:
> >>> Silence some compiler warnings.
> >>
> >> This introduces new compiler warnings "isNew computation has no side
> >> effects". How about "isNew = isNew;" ? We use this idiom in other
> >> places,
> >
> >
> > gcc doesn't warn about that, but it should.
> >
> > How about
> > (void)isNew;
>
> We use "isNew = isNew;" elsewhere... it seems pretty safe and doesn't
> use gnu extensions.
A reasonable front-end would warn about unused assignments, which
isNew = isNew;
would trigger in the examples of this thread when the assertion is compiled
out in release mode.
It's a shame GCC doesn't diagnose such things; hopefully clang will!
Neil.
More information about the llvm-commits
mailing list