This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/54047] New: unused variable warning not for std::string


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: unassigned@gcc.gnu.org
        ReportedBy: plasmahh@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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]