http://llvm.org/bugs/show_bug.cgi?id=5692
Summary: clang rejects invalid code with wrong diagnostic
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Keywords: quality-of-implementation
Severity: normal
Priority: P2
Component: Semantic Analyzer
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
This invalid code (u is not defined):
void foo() {
(union u)4;
}
is rejected with:
t.c:3:3: error: cast to union type from type 'int' not present in union
(union u)4;
^ ~
The diagnostic should say that 'u' is not complete.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs