[cfe-commits] r151377 - in /cfe/trunk: include/clang/Basic/DiagnosticParseKinds.td include/clang/Basic/DiagnosticSemaKinds.td lib/Parse/ParseDeclCXX.cpp lib/Sema/DeclSpec.cpp test/SemaCXX/cxx98-compat.cpp test/SemaCXX/decltype-98.cpp

Richard Smith richard at metafoo.co.uk
Fri Feb 24 14:35:52 PST 2012


On Fri, Feb 24, 2012 at 1:50 PM, Eli Friedman <eli.friedman at gmail.com>wrote:

> On Fri, Feb 24, 2012 at 10:10 AM, Richard Smith
> <richard-llvm at metafoo.co.uk> wrote:
> > Author: rsmith
> > Date: Fri Feb 24 12:10:23 2012
> > New Revision: 151377
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=151377&view=rev
> > Log:
> > __decltype is a GNU extension, not a C++11 extension.
>
> We don't normally warn about the use of __-prefixed keywords, since
> any use of such keywords is obviously an extension. Is there any
> particular reason to warn here?
>

There's no reason which is specific to this keyword. I'm not sure I
understand the motivation behind this distinction: if -Wgnu is intended to
warn on constructs which are not portable to non-GNU-compatible compilers,
then it should clearly warn on this. Otherwise, what is its intended
purpose?

Nonetheless, if we want to warn on GNU __-prefixed keywords, we should add
a warning somewhere more global to catch all of them, rather than just
warning on this one keyword; I've reverted this part of the change in
r151401.

Thanks!
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120224/3838448a/attachment.html>


More information about the cfe-commits mailing list