[LLVMbugs] [Bug 6667] New: Unnecessary duplicate warnings about undeclared identifiers

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Mar 21 08:37:03 PDT 2010


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

           Summary: Unnecessary duplicate warnings about undeclared
                    identifiers
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: tss at iki.fi
                CC: llvmbugs at cs.uiuc.edu


Getting multiple warnings about the same problem bloats the error list
unnecessarily and makes it more laborious to go through all the errors in one
compile output. For example:

int main(void) {
    int y;

    y = x;
    y = x;
    return 0;
}

% clang test2.c -o test2
test2.c:4:6: error: use of undeclared identifier 'x'
        y = x;
            ^
test2.c:5:6: error: use of undeclared identifier 'x'
        y = x;
            ^
2 diagnostics generated.

gcc's output is nicer:

% gcc test2.c -o test2
test2.c: In function ‘main’:
test2.c:4: error: ‘x’ undeclared (first use in this function)
test2.c:4: error: (Each undeclared identifier is reported only once
test2.c:4: error: for each function it appears in.)

-- 
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