[cfe-commits] r166361 - in /cfe/trunk: lib/CodeGen/CGExpr.cpp lib/Sema/SemaExpr.cpp test/CodeGenCXX/const-init-cxx11.cpp test/CodeGenCXX/for-range.cpp test/CodeGenCXX/lambda-expressions.cpp test/SemaCXX/lambda-expressions.cpp

Matthieu Monrocq matthieu.monrocq at gmail.com
Fri Oct 26 09:41:06 PDT 2012


On Fri, Oct 26, 2012 at 8:51 AM, Richard Smith <richard at metafoo.co.uk>wrote:

> On Thu, Oct 25, 2012 at 10:48 PM, Craig Topper <craig.topper at gmail.com>
> wrote:
> > I think this change broke bootstrap builds with C++11 and -Werror
> enabled.
> >
> > lib/VMCore/Verifier.cpp:116:14: error: variable 'PreVerifyID' is not
> needed
> > and will not be emitted [-Werror,-Wunneeded-internal-declaration]
> > static char &PreVerifyID = PreVerifier::ID;
>
> Yes, I think this change probably caused that. I'm unclear on what the
> purpose of that warning is: it appears to be warning on variables
> which are referenced but not odr-used, which seems like a pretty
> questionable thing to warn on. It'd be easy enough to fix this by
> teaching Sema::ShouldWarnIfUnusedFileScopedDecl to ignore references
> (along with its existing check for const variables), but I'm not sure
> that's the right fix, since I'm not really sure what the intent is
> here.
>


Is not PreVerifyID just an unused variable ? (not the difference with
PreVerifier::ID)

-- Matthieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121026/fe9084b5/attachment.html>


More information about the cfe-commits mailing list