-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
| Bugzilla Link | 11261 |
| Resolution | WONTFIX |
| Resolved on | Oct 28, 2011 18:01 |
| Version | trunk |
| OS | MacOS X |
| Reporter | LLVM Bugzilla Contributor |
| CC | @DougGregor |
Extended Description
When compiling code with clang++ 3.0 (as shipped with Apple XCode 4.2) that contains _Generic, an error is raised, like this:
test.cc:5:6: error: expected unqualified-id
int _Generic = 0;
After some googling around, this seems to be related to the "C1X generic selections" extension (see http://clang.llvm.org/doxygen/classclang_1_1GenericSelectionExpr.html). However, I could not find further information on this, and it is not clear to me whether this is part of C++11, or of a future extension of the C++ standard.
If this error really is intentional behavior, then please change the warning to something more helpful, like "_Generic is a C1X reserved keyword".
But personally I'd prefer if using _Generic was again made possible for code that does not explicitly request C1X extensions, as "legacy code" is using this.
For reference, this was with
Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin10.8.0
Thread model: posix