[llvm-bugs] [Bug 39979] New: syntax error for enum type name in _Generic
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Dec 12 13:05:34 PST 2018
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: unassignedclangbugs at nondot.org
Reporter: anders.granlund.0 at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181212/14336310/attachment.html>
More information about the llvm-bugs
mailing list