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: "marc.glisse at normalesup dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 03 Sep 2011 13:00:20 +0000
- Subject: [Bug c++/2316] g++ fails to overload on language linkage
- Auto-submitted: auto-generated
- References: <bug-2316-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316
Marc Glisse <marc.glisse at normalesup dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #25140|0 |1
is obsolete| |
--- Comment #32 from Marc Glisse <marc.glisse at normalesup dot org> 2011-09-03 13:00:20 UTC ---
Created attachment 25181
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25181
remember linkage of a function type (3)
This version of the patch, with -fpermissive and without -Werror, bootstraps
gcc without requiring any patching. -fpermissive does most of the work of
allowing any conversion, I only had to add some code so "&operator new[]"
(overloaded) knew which conversion to pick.
Obviously the patch needs completing (I am certainly missing many things),
cleaning up, and additional work to allow conversions without -fpermissive, and
only those that differ only by extern "C" somewhere. In other words it still
needs to be (re)written ;-)
But I think it is very encouraging that it compiles gcc (including libstdc++)
without any patching (but lots of warnings), which means this bug might be
fixed without breaking too much user code (we can be more lax than sunpro,
which rejects gcc sources in 2 places). And I don't think it introduces too
much ambiguity (overloading on linkage still works on a few tests).