From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2254 invoked by alias); 25 Aug 2009 14:49:10 -0000 Received: (qmail 2118 invoked by uid 48); 25 Aug 2009 14:48:55 -0000 Date: Tue, 25 Aug 2009 14:49:00 -0000 Message-ID: <20090825144855.2117.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/40942] GCC accepts code that Comeau and MSVC deems invalid. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "tom at kera dot name" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-08/txt/msg01994.txt.bz2 ------- Comment #4 from tom at kera dot name 2009-08-25 14:48 ------- (In reply to comment #2) > Why would this be ambiguous? A string literal has type "array of n const char" > (see 2.13.4/1), so it should go with the array constructor. Do you disagree? > > W. > Table 9 under 13.3.3/1 shows that array-to-pointer conversion is Exact Match. As is rvalue-to-lvalue conversion (though string literals are lvalues anyway :D). As is Identity, which is what applies here. There is no clear ranking between them, hence Comeau reporting ambiguity. Although I personally think Identity should overrule absolutely everything, it doesn't. So IMO GCC is buggy in this way. -- tom at kera dot name changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tom at kera dot name http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40942