[LLVMbugs] [Bug 13705] New: Warn on duplicate const specifier
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Aug 27 02:23:50 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13705
Bug #: 13705
Summary: Warn on duplicate const specifier
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: rdivacky at freebsd.org
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
struct aaa;
void foo (const aaa const *x) {
}
clang gives no warning on this while g++ nicely diagnoses there's duplicate
'const'
x.cpp:3:11: error: duplicate ‘const’
This is useful as it was probably meant "const aaa * const x)" so it's a typo.
I suggest we warn/error (gcc errors) and provide a note/fixit.
--
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