Article View: comp.std.c++
Article #1794Re: Linkage revisited
From: Fergus Henderson
Date: Wed, 16 Aug 1995 10:46
Date: Wed, 16 Aug 1995 10:46
36 lines
1737 bytes
1737 bytes
[apologies if anyone sees this twice - fjh.]
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:
<fjh-950822-173120@cs.mu.oz.au>Path:
arc1-ca.pugleaf.net!in2.uu.net!bounce-backReferences:
<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: 16 Aug 95 10:46:33 GMT Approved: fjh@cs.mu.oz.au Newsgroups: comp.std.c++ From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson) Subject: Re: Linkage revisited 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 Message-ID: <fjh-950822-173120@cs.mu.oz.au>