🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #1780

Re: Linkage revisited

#1780
From: Fergus Henderson
Date: Tue, 15 Aug 1995 16:53
34 lines
1690 bytes
clamage@Eng.Sun.COM (Steve Clamage) writes:

>Now things get stickier. It's fine for you to say "name encoding scheme"
>and "calling conventions". But the standard would have to define what
>that means.
[...]
>We cannot solve all problems with a language standard.

Agreed, specifying ABIs and "name encoding schemes" is far beyond the
scope of the C++ standard.  But defining the behaviour of the following
C++ program certainly is.

void foo(void (*func)()) { (*func)(); }
void bar() {}
extern "C" void baz() {}

int main() {
foo(bar);
foo(baz);
return 0;
}

Should it be the same as `int main() { return 0; }', or should
it have undefined behaviour?  That is the unresolved issue.

--
Fergus Henderson              | Designing grand concepts is fun;
fjh@cs.mu.oz.au               | finding nitty little bugs is just work.
http://www.cs.mu.oz.au/~fjh   | -- Brooks, in "The Mythical Man-Month".
PGP key fingerprint: 00 D7 A2 27 65 09 B6 AC  8B 3E 0F 01 E7 5D C4 3F
---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <9522801.5889@mulga.cs.mu.OZ.AU>
Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back
References: <1995Aug3.151555.1415@ittpub> <3vqs87$6kp@engnews2.Eng.Sun.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back
Date: 15 Aug 95 16:53:25 GMT
Approved: fjh@cs.mu.oz.au
Newsgroups: comp.std.c++
From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
Subject: Re: Linkage revisited
Message-ID: <9522801.5889@mulga.cs.mu.OZ.AU>
Sender: news@cs.mu.OZ.AU (CS-Usenet)
Organization: Computer Science, University of Melbourne, Australia
References: <1995Aug3.151555.1415@ittpub> <3vqs87$6kp@engnews2.Eng.Sun.COM>
X-Original-Date: Tue, 15 Aug 1995 15:50:53 GMT