[Bug c++/30019] New: g++ did not issue a warning when it (IMO) could have
dflogeras2 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Nov 29 19:04:00 GMT 2006
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
More information about the Gcc-bugs
mailing list