This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/7781: std::string foo = foo + "b" is compiled without warning!
- From: udbz at rz dot uni-karlsruhe dot de
- To: gcc-gnats at gcc dot gnu dot org
- Date: 30 Aug 2002 20:04:39 -0000
- Subject: c++/7781: std::string foo = foo + "b" is compiled without warning!
- Reply-to: udbz at rz dot uni-karlsruhe dot de
>Number: 7781
>Category: c++
>Synopsis: std::string foo = foo + "b" is compiled without warning!
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Aug 30 13:06:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: udbz@rz.uni-karlsruhe.de
>Release: gcc-3.0.3
>Organization:
>Environment:
>Description:
The code construct below IMHO never makes sense and
should spill a warning.
>How-To-Repeat:
#include <iostream.h>
#include <string>
int main()
{
std::string foo = foo + "b";
std::cout << foo << endl;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: