c++/7775: std::string foo = foo + "b" is erroneously compiled

Gabriel Dos Reis gdr@integrable-solutions.net
Fri Aug 30 09:44:00 GMT 2002


nathan@gcc.gnu.org writes:

| Synopsis: std::string foo = foo + "b" is erroneously compiled
| 
| State-Changed-From-To: open->closed
| State-Changed-By: nathan
| State-Changed-When: Fri Aug 30 09:07:58 2002
| State-Changed-Why:
|     The code is ill-formed. No diagnostic is required.

Well, the code invokes an undefined behaviour, but it is not
ill-formed.

-- Gaby



More information about the Gcc-bugs mailing list