public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dbaron at dbaron dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/8680] g++ doesn't warn when passing a C++ funcptr instead of extern "C" funcptr
Date: Sat, 20 Aug 2005 07:56:00 -0000	[thread overview]
Message-ID: <20050820043314.8863.qmail@sourceware.org> (raw)
In-Reply-To: <20021122091602.8680.apm35@student.open.ac.uk>


------- Additional Comments From dbaron at dbaron dot org  2005-08-20 04:33 -------
As I wrote in https://bugzilla.mozilla.org/show_bug.cgi?id=81385#c9 :

Looking at the C++ standard (the out-of-date 1998 version, I admit), as far as I
can tell a conformant compiler is required to give a diagnostic for this.  In
particular, section 7.5 [dcl.link] clause 1 says that function types with
different linkage are different types, section 4 [conv] does not describe any
standard conversions that could convert between them, and section 5.2.2
[expr.call] clause 4 and section 8.5 [dcl.init] clauses 12 and 14 seem to
require that such a conversion exist.

In particular, the last says that the conversion is ill-formed, which 1.4
[intro.compliance] says requires a diagnostic.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dbaron at dbaron dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8680


      parent reply	other threads:[~2005-08-20  4:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20021122091602.8680.apm35@student.open.ac.uk>
2003-05-25 23:20 ` pinskia@physics.uc.edu
2003-08-02 18:19 ` pinskia at physics dot uc dot edu
2003-08-03 20:48 ` apm35 at student dot open dot ac dot uk
2005-08-20  7:56 ` dbaron at dbaron dot org [this message]

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=20050820043314.8863.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).