[LLVMbugs] [Bug 7606] New: Poor diagnostic for a typo of ',' instead of '; ' at the end of an statement
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jul 9 04:00:09 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7606
Summary: Poor diagnostic for a typo of ',' instead of ';' at
the end of an statement
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Keywords: quality-of-implementation
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: chandlerc at gmail.com
CC: llvmbugs at cs.uiuc.edu
This diagnostic could be a *lot* better, at the least poniting at the ','
operator, and the two expression operands instead of the curly on the next
line. Still better would be to suggest a ';', at least if the next token is a
'}'.
% cat t3.cc
int foo() {
return 42,
}
% gcc -fsyntax-only t3.cc
t3.cc: In function 'int foo()':
t3.cc:3: error: expected primary-expression before '}' token
t3.cc:3: error: expected ';' before '}' token
% clang -fsyntax-only t3.cc
t3.cc:3:1: error: expected expression
}
^
t3.cc:3:2: error: expected '}'
}
^
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.
More information about the llvm-bugs
mailing list