http://llvm.org/bugs/show_bug.cgi?id=10982
Summary: clang weird diagnostic for wrong enums!
Product: clang
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Given the following code:
#include <stdio.h>
enum {
3DNowShift = 0,
XXX = 1
};
int main() {
printf("%d\n", XXX);
return 0;
}
Instead of clang reporting that a enum can't start with a number or something
like that, it points "{}" matching error:
$ clang /tmp/bug.c -c
/tmp/bug.c:4:3: error: expected '}'
3DNowShift = 0,
^
/tmp/bug.c:3:6: note: to match this '{'
enum {
^
/tmp/bug.c:9:18: error: use of undeclared identifier 'XXX'
printf("%d\n", XXX);
^
2 errors generated.
--
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