From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32605 invoked by alias); 22 Jan 2002 16:37:05 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 32561 invoked by uid 61); 22 Jan 2002 16:37:04 -0000 Date: Tue, 22 Jan 2002 08:37:00 -0000 Message-ID: <20020122163703.32560.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, p.klotz@icoserve.com From: neil@gcc.gnu.org Reply-To: neil@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, p.klotz@icoserve.com, gcc-gnats@gcc.gnu.org X-Mailer: gnatsweb 2.9.3 Subject: Re: c++/5452: The following code compiles. Why? MSVC++6 does not. X-SW-Source: 2002-01/txt/msg00772.txt.bz2 List-Id: 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