public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tom at kera dot name" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/40942] GCC accepts code that Comeau and MSVC deems invalid.
Date: Tue, 25 Aug 2009 14:49:00 -0000	[thread overview]
Message-ID: <20090825144855.2117.qmail@sourceware.org> (raw)
In-Reply-To: <bug-40942-629@http.gcc.gnu.org/bugzilla/>



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


  parent reply	other threads:[~2009-08-25 14:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-02 14:48 [Bug c++/40942] New: " v dot haisman at sh dot cvut dot cz
2009-08-04 12:55 ` [Bug c++/40942] " jwakely dot gcc at gmail dot com
2009-08-25 13:25 ` bangerth at gmail dot com
2009-08-25 14:20 ` v dot haisman at sh dot cvut dot cz
2009-08-25 14:49 ` tom at kera dot name [this message]
     [not found] <bug-40942-4@http.gcc.gnu.org/bugzilla/>
2012-03-29 13:43 ` redi at gcc dot gnu.org
2012-03-29 17:53 ` vhaisman at gmail dot com
2012-03-29 20:00 ` manu at gcc dot gnu.org
2012-03-30 16:20 ` dodji at gcc dot gnu.org
2012-03-31 17:07 ` dodji at seketeli dot org
2012-04-02  8:53 ` dodji at gcc dot gnu.org
2012-04-02  8:57 ` dodji at gcc dot gnu.org
2021-08-23  7:24 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090825144855.2117.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).