http://llvm.org/bugs/show_bug.cgi?id=4111
Summary: poor error recovery for incorrect typename
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Semantic Analyzer
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
This C or C++ program:
void f(sqrgl);
produces:
t.c:1:8: error: a parameter list without types is only allowed in a function
definition
void f(sqrgl);
^
t.c:1:6: error: variable has incomplete type 'void'
void f(sqrgl);
^
in C mode, and:
t.c:1:6: error: variable has incomplete type 'void'
void f(sqrgl);
^
t.c:1:8: error: use of undeclared identifier 'sqrgl'
void f(sqrgl);
^
in C++ mode. These are both pretty bad, each should only produce one
diagnostic. In practice, I saw this with "void foo(mytype_t);" which looks to
a human like it's a type :)
--
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