[llvm-bugs] [Bug 39929] New: Problem when declaring enum constant with old style function parameter declaration in C11.
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Dec 9 05:17:59 PST 2018
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: 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
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181209/492eecf6/attachment.html>
More information about the llvm-bugs
mailing list