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

Peter Schlaile udbz@rz.uni-karlsruhe.de
Fri Aug 30 11:36:00 GMT 2002


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

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

 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 if eventually this conforms to the C++ standard (which is
 strange enough, since
 
 string foo(foo + "a");
 
 is an error), but most definitely you should throw a warning!
 
 Regards,
 Peter
 
 ---
 Peter Schlaile  ***  eMail udbz@rz.uni-karlsruhe.de
 
 So Linus, what are we doing tonight?
           The same thing we do every night Tux. Try to take over the world!
 



More information about the Gcc-prs mailing list