[LLVMbugs] [Bug 11550] New: Missing warning for unused variables of a class type with user declare constructor
    bugzilla-daemon at llvm.org 
    bugzilla-daemon at llvm.org
       
    Mon Dec 12 17:56:08 PST 2011
    
    
  
http://llvm.org/bugs/show_bug.cgi?id=11550
             Bug #: 11550
           Summary: Missing warning for unused variables of a class type
                    with user declare constructor
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rafael.espindola at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified
We don't warn about
-------------------
struct S {
  S();
};
S foo();
void bar() {
  S x = foo();
}
-----------------
gcc 4.6 warns about x being "set but not used", which I don't think is
technically correct, but it is better than nothing.
-- 
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