public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/8680] g++ doesn't warn when passing a C++ funcptr instead of extern "C" funcptr
       [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
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: pinskia@physics.uc.edu @ 2003-05-25 23:20 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia@physics.uc.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1864|application/octet-stream    |text/plain
          mime type|                            |
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-05-25 23:11:13
               date|                            |


------- Additional Comments From pinskia@physics.uc.edu  2003-05-25 23:11 -------
confirmed on mainline (20030525) with modified sources (for 3.4 fixes of pedantic):

extern "C" {
void doSomething(int, void*(*)(void*));
} 

void* func(void*);

int main()
{
    doSomething(1, func);
    return 0;
}



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/8680] g++ doesn't warn when passing a C++ funcptr instead of extern "C" funcptr
       [not found] <20021122091602.8680.apm35@student.open.ac.uk>
  2003-05-25 23:20 ` [Bug c++/8680] g++ doesn't warn when passing a C++ funcptr instead of extern "C" funcptr 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
  3 siblings, 0 replies; 4+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-02 18:19 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
           Keywords|                            |diagnostic
         Resolution|                            |WONTFIX


------- Additional Comments From pinskia at physics dot uc dot edu  2003-08-02 18:19 -------
Actually I think this warning message is useless as the standard does not talk about the 
difference between C and C++ function (except for mangling).

Also ICC 6.0 in strict mode does not warn about this.
And EDG 2.40 (Mar 22 2001 17:35:55) does not warn either.

So closing as will not fix.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/8680] g++ doesn't warn when passing a C++ funcptr instead of extern "C" funcptr
       [not found] <20021122091602.8680.apm35@student.open.ac.uk>
  2003-05-25 23:20 ` [Bug c++/8680] g++ doesn't warn when passing a C++ funcptr instead of extern "C" funcptr 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
  3 siblings, 0 replies; 4+ messages in thread
From: apm35 at student dot open dot ac dot uk @ 2003-08-03 20:48 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From apm35 at student dot open dot ac dot uk  2003-08-03 20:47 -------
Subject: Re:  g++ doesn't warn when passing a C++ funcptr instead of extern

gcc-bugzilla@gcc.gnu.org writes:
>PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
[snip]
>So closing as will not fix.
I will have to find the relevant section of the std that says a diagnostic
is required in this case. Stay tuned.

Regards,

Andrew Marlow
----
There is an emerald here the size of a plover's egg!


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/8680] g++ doesn't warn when passing a C++ funcptr instead of extern "C" funcptr
       [not found] <20021122091602.8680.apm35@student.open.ac.uk>
                   ` (2 preceding siblings ...)
  2003-08-03 20:48 ` apm35 at student dot open dot ac dot uk
@ 2005-08-20  7:56 ` dbaron at dbaron dot org
  3 siblings, 0 replies; 4+ messages in thread
From: dbaron at dbaron dot org @ 2005-08-20  7:56 UTC (permalink / raw)
  To: gcc-bugs


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-08-20  4:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20021122091602.8680.apm35@student.open.ac.uk>
2003-05-25 23:20 ` [Bug c++/8680] g++ doesn't warn when passing a C++ funcptr instead of extern "C" funcptr 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 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).