https://bugs.llvm.org/show_bug.cgi?id=39929
Bug ID: 39929
Summary: Problem when declaring enum constant with old style
function parameter declaration in C11.
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):
void f(e)
enum { x } e;
{
x;
}
int main()
{
}
I was compiling this program with:
clang prog.c -std=c11 -pedantic-errors "-w"
The expected behaviour is that it should work, but I get the following error:
error: use of undeclared identifier 'x'
Note that it works fine when using the new style of declaring function
parameters.
Also note that it works fine in gcc.
Link to online compiler:
https://wandbox.org/permlink/CGczhD2xFRJkUzTs
--
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