public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/5452: The following code compiles. Why? MSVC++6 does not.
@ 2002-01-22 8:37 neil
0 siblings, 0 replies; 3+ messages in thread
From: neil @ 2002-01-22 8:37 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, p.klotz
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c++/5452: The following code compiles. Why? MSVC++6 does not.
@ 2003-01-01 21:07 neroden
0 siblings, 0 replies; 3+ messages in thread
From: neroden @ 2003-01-01 21:07 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, p.klotz
Synopsis: The following code compiles. Why? MSVC++6 does not.
State-Changed-From-To: analyzed->closed
State-Changed-By: neroden
State-Changed-When: Wed Jan 1 13:07:05 2003
State-Changed-Why:
I've verified that indeed, Neil's analysis is correct.
Not a bug.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5452
^ permalink raw reply [flat|nested] 3+ messages in thread
* c++/5452: The following code compiles. Why? MSVC++6 does not.
@ 2002-01-22 5:36 p.klotz
0 siblings, 0 replies; 3+ messages in thread
From: p.klotz @ 2002-01-22 5:36 UTC (permalink / raw)
To: gcc-gnats
>Number: 5452
>Category: c++
>Synopsis: The following code compiles. Why? MSVC++6 does not.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 22 05:36:05 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: p.klotz@icoserve.com
>Release: unknown-1.0
>Organization:
>Environment:
Red Hat Linux, gcc 3.0.2
>Description:
#include <string>
int main(void)
{
+"/"+std::string("/");
return 0;
}
>How-To-Repeat:
g++ -W -Wall prg.cpp
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-01-01 21:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-22 8:37 c++/5452: The following code compiles. Why? MSVC++6 does not neil
-- strict thread matches above, loose matches on Subject: below --
2003-01-01 21:07 neroden
2002-01-22 5:36 p.klotz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).