https://bugs.llvm.org/show_bug.cgi?id=39928
Bug ID: 39928
Summary: Fails to detect redefinition of struct when nesting in
C11 program.
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 S { struct S { int a; } b; };
}
It was compiled with the following command line:
clang prog.c -std=c11 -pedantic-errors "-w"
The expected behaviour was to get an error about redefinition of the struct S,
but no errors are given. The two struct definitions are in the same scope
(block scope) so they should conflict. There are no struct scopes in C11.
Note that gcc gives the expected error.
Online compiler link: https://wandbox.org/permlink/JeT9d5XpZLOxJLuj
--
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