http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54047

             Bug #: 54047
           Summary: unused variable warning not for std::string
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: plasm...@gmx.net


Compiling the following code:

#include <string>

struct A { };

void foo()
{
        A z;
        std::string z0;
}


I get a warning for unused variable z, but not for variable z0. It seems that
std::string is somehow magical here, but I can't see how or why.

Reply via email to