This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/2316] g++ fails to overload on language linkage
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 01 Mar 2014 18:52:27 +0000
- Subject: [Bug c++/2316] g++ fails to overload on language linkage
- Auto-submitted: auto-generated
- References: <bug-2316-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316
--- Comment #49 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Harald van Dijk from comment #48)
> I've been experimenting with this (although updated to more recent GCC), and
> one issue I see, functionality-wise, is what happens when an extern "C"
> function declaration is followed by a function definition without extern "C"
> being specified:
The examples in [dcl.link] seem to agree with your interpretation. It is likely
that I missed several cases like this one. As you can see, I haven't worked on
this in more than 2 years, and I don't think I'll work on it again any time
soon, so feel free to take over (and don't hesitate to consider large pieces of
my patch as nonsense). Fixing this particular issue should not be too hard,
there must be a place in the compiler that merges a number of properties from
the early declaration into the definition, and we need to add extern "C" to
that list.