https://bugs.llvm.org/show_bug.cgi?id=39979
Bug ID: 39979
Summary: syntax error for enum type name in _Generic
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: anders.granlun...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk
I tried to compile the following program (prog.c):
int main()
{
_Generic(0, enum { e }: 0, default: 0);
}
using the following command line:
clang prog.c -std=c11 -pedantic-errors "-w"
The expected behaviour is that the code should compile without errors, but I
get some syntax error.
Note that this works in gcc.
Link to online compiler:
https://wandbox.org/permlink/uUHq74Z4sn8wisgX
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs