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: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 30 Aug 2002 16:46:00 -0000
- Subject: Re: c++/7775: std::string foo = foo + "b" is erroneously compiled
- Reply-to: Gabriel Dos Reis <gdr at integrable-solutions dot net>
The following reply was made to PR c++/7775; it has been noted by GNATS.
From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: 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 18:37:32 +0200
udbz@rz.uni-karlsruhe.de writes:
| >Number: 7775
| >Category: c++
| >Synopsis: std::string foo = foo + "b" is erroneously compiled
| >Confidential: no
| >Severity: serious
| >Priority: medium
| >Responsible: unassigned
| >State: open
| >Class: accepts-illegal
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.
-- Gaby