[cfe-dev] Ill-formed or not?

Nikola Smiljanic popizdeh at gmail.com
Thu May 5 12:42:01 PDT 2011


I was playing with Clang and tried declaring variables named like C++
keywords just to see the error I would get, but I noticed that in some cases
Clang gives only warnings. Same thing happens with msvc10 (only warnings)
but gcc reports an error for each line and now I'm curious to know who's
right?

I understand that something like "int const" might be a valid declaration
(the only thing missing is a variable name), but "int virtual" seems just
wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110505/c9c9f947/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: keywords.cpp
Type: text/x-c++src
Size: 200 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110505/c9c9f947/attachment.cpp>


More information about the cfe-dev mailing list