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

             Bug #: 14253
           Summary: No unused warning for variables of non-trivial types
           Product: clang
           Version: trunk
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified


Clang warns about unused variables e.g. of type 'int', but not 'std::string' :

$ cat a.cpp
#include <string>

void foo()
    {
    int i;
    std::string s;
    }
$ clang++ -Wall -Wunused -c a.cpp
a.cpp:5:9: warning: unused variable 'i' [-Wunused-variable]
    int i;
        ^
1 warning generated.                                                            

In the function 's' is apparently unused too, but the compiler cannot tell it.

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