This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/30019] New: g++ did not issue a warning when it (IMO) could have
- From: "dflogeras2 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Nov 2006 19:04:27 -0000
- Subject: [Bug c++/30019] New: g++ did not issue a warning when it (IMO) could have
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Hi, I mixed up the following code to reset a ostringstream
ostringstream oss;
oss << "Stuff";
oss.str() = ""; // Should have been oss.str( "" );
The third line is creating a temporary variable and assigning it the new ""
value, then it disappears. Couldn't g++ have warned me of an unused temp? I
know I have seen it do things like that before.
Thanks
--
Summary: g++ did not issue a warning when it (IMO) could have
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dflogeras2 at gmail dot com
GCC host triplet: Gentoo Linux
GCC target triplet: Target: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30019