This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/54047] New: unused variable warning not for std::string
- From: "plasmahh at gmx dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 20 Jul 2012 11:52:44 +0000
- Subject: [Bug c++/54047] New: unused variable warning not for std::string
- Auto-submitted: auto-generated
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.