https://bugs.llvm.org/show_bug.cgi?id=39930
Bug ID: 39930
Summary: Clang thinks that C11 program does not declare
anything but it does.
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
Consider the following C11 program (prog.c):
int main()
{
struct { enum { a } b; };
}
This program does NOT violate rule 6.7.2 in the C11 standard since the
declaration declares a member of an enum (a).
I tried to compile it with the following command line:
clang prog.c -std=c11 -pedantic-errors "-w"
I get the following unexpected error message:
error: declaration does not declare anything
This is wrong. The declaration does declare the enum member a and according
to the C11 standard it does not need to declare anything else.
Link to online compiler:
https://wandbox.org/permlink/faE68OsNgwxxizMs
--
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