This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Synopsis: std::string foo = foo + "b" is erroneously compiled

State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Fri Aug 30 09:07:58 2002
State-Changed-Why:
    The code is ill-formed. No diagnostic is required.
    	string foo = foo + "b";
    is equivalent to
    	string foo (string (foo.operator+ ("b"));
    which calls string::operator+ on foo, before it has been
    constructed

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7775


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]