------- 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