This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7775: std::string foo = foo + "b" is erroneously compiled
- From: Peter Schlaile <udbz at rz dot uni-karlsruhe dot de>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 30 Aug 2002 18:06:01 -0000
- Subject: Re: c++/7775: std::string foo = foo + "b" is erroneously compiled
- Reply-to: Peter Schlaile <udbz at rz dot uni-karlsruhe dot de>
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!