GCC 3.0 Status Report
Fergus Henderson
fjh@cs.mu.oz.au
Sun Apr 22 08:41:00 GMT 2001
On 19-Apr-2001, John David Anglin <dave@hiauly1.hia.nrc.ca> wrote:
> Here is a fix for the undefined reference std::errno. The language
> experts can debate whether it is the right thing to do.
...
> * mangle.c (mangle_decl_string): Don't mangle variables with
> extern "C" linkage.
That's the right thing to do.
The relevant text in the C++ standard is 7.5 [dcl.link] paragraph 2:
| Two declarations for an object with C language linkage with the same
| name (ignoring the namespace names that qualify it) that appear in
| different namespace scopes refer to the same object.
Personally I don't think this one was a particularly good decision
(e.g. because it will cause trouble if a future extension of C
adds namespaces...), but that's what the committee decided.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: < http://www.cs.mu.oz.au/~fjh > | -- the last words of T. S. Garp.
More information about the Gcc
mailing list