This is the mail archive of the gcc-bugs@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++/5452: The following code compiles. Why? MSVC++6 does not.


Synopsis: The following code compiles. Why? MSVC++6 does not.

State-Changed-From-To: open->analyzed
State-Changed-By: neil
State-Changed-When: Tue Jan 22 08:37:03 2002
State-Changed-Why:
    I'm not an expert, but Comeau compiles this too, and if G++
    and Comeau compile it, I tend to believe it's correct 8-)
    
    I suspect the unary plus decays the string literal to a
    pointer to const char, which then combines without problems
    with the binary '+' of std::string after a conversion of
    const char * to std::string.  But I could be wrong 8-)

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


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