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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to