[LLVMbugs] [Bug 20021] New: static_assert rejected in anonymous structs/unions
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Jun 12 16:09:31 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20021
Bug ID: 20021
Summary: static_assert rejected in anonymous structs/unions
Product: clang
Version: 3.4
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: jtouton at blizzard.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Clang rejects static_assert inside of anonymous structs:
struct blah
{
struct
{
int x;
static_assert(true, "huh?"); // Error
};
};
int main(int argc, const char * argv[])
{
blah b;
b.x = 5;
return b.x;
}
error: anonymous struct can only contain non-static data members
This should compile without issue.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140612/18051068/attachment.html>
More information about the llvm-bugs
mailing list