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

Gabriel Dos Reis gdr@integrable-solutions.net
Fri Aug 30 09:46: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: 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



More information about the Gcc-prs mailing list