http://llvm.org/bugs/show_bug.cgi?id=4846
Summary: Diagnostics for declaration typos can be terrible, and
are in any case inconsistent
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: parser
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
At global scope, the following declaration (a common typo) gives a nasty error:
sturct foo { };
If the same declaration is made in function scope:
void bar () { sturct foo { }; }
then the second error disappears. This is inconsistent. Furthermore, the same
error is encountered if the function argument parentheses are accidentally
omitted at global scope, or with "int foo :", which could be a label or (in
C++) a base specifier.
The error message should be consistent between the two scopes, and, if the
"invalid token" message is retained, it should probably disambiguate for some
of the common misspellings.
--
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