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

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


The following reply was made to PR c++/7775; it has been noted by GNATS.

From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: Peter Schlaile <udbz@rz.uni-karlsruhe.de>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/7775: std::string foo = foo + "b" is erroneously compiled
Date: 30 Aug 2002 21:31:45 +0200

 Peter Schlaile <udbz@rz.uni-karlsruhe.de> writes:
 
 | Hi!
 | 
 | On 30 Aug 2002, Gabriel Dos Reis wrote:
 | 
 | > udbz@rz.uni-karlsruhe.de writes:
 | >
 | > No, this is not a bug.  Just before "=", the name foo is available for
 | > use.  The bevaviour is undefined, but that doesn't mean the compiler
 | > is bogus.  It is a bug in your program.
 | 
 | I don't mind 
 
 Sure, you should, because you filled this PR as a "accept-illegal".
 And the code wasn't invalid and the compiler was right in accepting
 it.
 
 -- Gaby



More information about the Gcc-prs mailing list