This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/2316] g++ fails to overload on language linkage


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316

Marc Glisse <marc.glisse at normalesup dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #26214|0                           |1
        is obsolete|                            |

--- Comment #39 from Marc Glisse <marc.glisse at normalesup dot org> 2012-01-04 11:10:30 UTC ---
Created attachment 26237
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26237
remember linkage of a function type (5)

Updated patch, now bootstraps with configure --enable-languages=c,c++
--disable-werror (except for some __int128 error in libitm which I assume is
unrelated). The main difference is that I allow (with a warning) conversions
between function pointers that differ by extern "C", so things like calling
pthread_create with a C++ function compile. The library changes are still there
but most of them are unnecessary if we don't mind warnings.

I didn't try to do the cleanup suggested by Andrew, I was concentrating on the
functionality. And I believe the only big functionality missing is giving
builtins their right type (__builtin_memcpy is extern "C", operator new[] is
"C++", etc).

Then (before even thinking of cleaning up the patch and fixing the whole gcc
code base) will come the decision of whether we actually want to do this
change. It is necessary in order to conform to the standard, but it is more
convenient to keep ignoring linkage...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]