Article View: comp.windows.x
Article #38363Re: C++ and callbacks
From: Ian J Hogg
Date: Fri, 06 May 1994 19:38
Date: Fri, 06 May 1994 19:38
19 lines
1985 bytes
1985 bytes
In article <JASON.94May5173436@deneb.cygnus.com> jason@cygnus.com (Jason Merrill) writes:
>>>>>> Brandon Van Every <brandon@uncvx2.oit.unc.edu> writes:
>
>> I can't find anything in Stroustrup that says this will work. The default
>> linkage for all functions is "C++" (p. 524). Given that, I'd say that not
>> using "extern C" is rather risky.
>
>But does anything say that it won't? C and C++ use the same calling
>convention for plain functions, so C linkage v. C++ should have no effect
>on function pointers.
Where does anything say that C and C++ use the same calling convention for
plain functions. As I've stated before I know of at least one compiler that
passes arguments for C++ linkage functions differently than C linkage functions.
Are you saying this compiler is broken?
--
===============================================================================
Ian Hogg ianhogg@cs.umn.edu
(612) 424-6332
Technical Details
Message-ID:
<CpEBxp.9w2@news.cis.umn.edu>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!hookup!swrinde!ihnp4.ucsd.edu!mvb.saic.com!MathWorks.Com!news.duke.edu!news-feed-1.peachnet.edu!umn.edu!milli!ianhoggReferences:
<2q67fpINNgv5@eccdb1.pms.ford.com> <2q9v55$ted@bigblue.oit.unc.edu> <JASON.94May5173436@deneb.cygnus.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103734,ad5a39011a2d3d26 X-Google-Attributes: gid103734,public X-Google-Thread: 109fba,ad5a39011a2d3d26 X-Google-Attributes: gid109fba,public X-Google-Thread: 10ba33,ad5a39011a2d3d26 X-Google-Attributes: gid10ba33,public X-Google-ArrivalTime: 1994-05-06 13:35:59 PST Newsgroups: comp.windows.x,comp.lang.c++,gnu.g++.help Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!hookup!swrinde!ihnp4.ucsd.edu!mvb.saic.com!MathWorks.Com!news.duke.edu!news-feed-1.peachnet.edu!umn.edu!milli!ianhogg From: ianhogg@milli.cs.umn.edu (Ian J Hogg) Subject: Re: C++ and callbacks Message-ID: <CpEBxp.9w2@news.cis.umn.edu> Sender: news@news.cis.umn.edu (Usenet News Administration) Nntp-Posting-Host: milli.cs.umn.edu Organization: University of Minnesota, Minneapolis, CSci dept. References: <2q67fpINNgv5@eccdb1.pms.ford.com> <2q9v55$ted@bigblue.oit.unc.edu> <JASON.94May5173436@deneb.cygnus.com> Date: Fri, 6 May 1994 19:38:32 GMT Lines: 19