[LLVMbugs] [Bug 15523] New: clang prints almost repeated errors for multiple redeclarations with different types

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Mar 15 08:00:57 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=15523

            Bug ID: 15523
           Summary: clang prints almost repeated errors for multiple
                    redeclarations with different types
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rafael.espindola at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Given

extern int a;
extern float a;
float a;

we print

/home/espindola/llvm/test.cpp:2:14: error: redefinition of 'a' with a different
type: 'float' vs 'int'
extern float a;
             ^
/home/espindola/llvm/test.cpp:1:12: note: previous definition is here
extern int a;
           ^
/home/espindola/llvm/test.cpp:3:7: error: redefinition of 'a' with a different
type: 'float' vs 'int'
float a;
      ^
/home/espindola/llvm/test.cpp:1:12: note: previous definition is here
extern int a;


Producing an error only for the first redeclartion with an different type
should be sufficient.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130315/e683de46/attachment.html>


More information about the llvm-bugs mailing list