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

2021-12-14 Thread eric-bugs at omnifarious dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #55 from eric-bugs at omnifarious dot org --- C++ may get an ABI change one of these days. It needs one in order to have a properly efficient unique_ptr. Since that ABI change would involve who calls destructors and C doesn't have

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

2018-01-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 Jonathan Wakely changed: What|Removed |Added CC||dan.cermak@cgc-instruments.

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

2014-04-21 Thread harald at gigawatt dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #53 from Harald van Dijk harald at gigawatt dot nl --- (In reply to Marc Glisse from comment #52) (In reply to Harald van Dijk from comment #51) extern C { void f(); } typedef void t(); t f, *g = f; // valid redeclaration of f,

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

2014-03-08 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #52 from Marc Glisse glisse at gcc dot gnu.org --- (In reply to Harald van Dijk from comment #51) Note that a consequence of this is that a function declaration that uses a typedef may not be compatible with the typedef (I think):

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

2014-03-07 Thread harald at gigawatt dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #51 from Harald van Dijk harald at gigawatt dot nl --- (In reply to Marc Glisse from comment #49) 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

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

2014-03-02 Thread amylaar at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #50 from Jorn Wolfgang Rennecke amylaar at gcc dot gnu.org --- (In reply to Marc Glisse from comment #49) large pieces of my patch as nonsense). Fixing this particular issue should not be too hard, there must be a place in the

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

2014-03-01 Thread harald at gigawatt dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 Harald van Dijk harald at gigawatt dot nl changed: What|Removed |Added CC||harald at

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

2014-03-01 Thread glisse at gcc dot gnu.org
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

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

2013-03-21 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 Andrew Pinski pinskia at gcc dot gnu.org changed: What|Removed |Added CC||jed at

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

2012-02-22 Thread xiaoyuanbo at yeah dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 xiaoyuanbo xiaoyuanbo at yeah dot net changed: What|Removed |Added CC||xiaoyuanbo at yeah

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

2012-01-04 Thread marc.glisse at normalesup dot org
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

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

2012-01-04 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #40 from Jonathan Wakely redi at gcc dot gnu.org 2012-01-04 11:49:35 UTC --- Great! If all existing code is accepted with a warning that provides backwards compatibility, but also allows conforming code to correctly overload on

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

2012-01-04 Thread bangerth at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 Wolfgang Bangerth bangerth at gmail dot com changed: What|Removed |Added CC||bangerth at

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

2012-01-04 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added CC||jakub at gcc dot

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

2012-01-04 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #43 from Marc Glisse marc.glisse at normalesup dot org 2012-01-04 12:51:55 UTC --- (In reply to comment #40) Great! If all existing code is accepted with a warning that provides backwards compatibility, but also allows conforming

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

2012-01-04 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #44 from Jonathan Wakely redi at gcc dot gnu.org 2012-01-04 13:00:27 UTC --- (In reply to comment #42) still I agree this would be terribly annoying for everybody. Not everybody, only those who don't also use another compiler that

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

2012-01-04 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #45 from Marc Glisse marc.glisse at normalesup dot org 2012-01-04 13:06:10 UTC --- (In reply to comment #42) Well, perhaps something like: #ifdef __cplusplus extern C++ int __REDIRECT_NTH (pthread_create, (pthread_t *__restrict

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

2012-01-02 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #38 from Marc Glisse marc.glisse at normalesup dot org 2012-01-02 10:39:35 UTC --- Thanks for the comments. (In reply to comment #36) The library should overload qsort, then the libitm/clone.cc change wouldn't be needed Indeed,

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

2012-01-01 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 Marc Glisse marc.glisse at normalesup dot org changed: What|Removed |Added Attachment #25181|0 |1

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

2012-01-01 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #36 from Jonathan Wakely redi at gcc dot gnu.org 2012-01-02 01:04:14 UTC --- The library should overload qsort, then the libitm/clone.cc change wouldn't be needed

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

2012-01-01 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #37 from Andrew Pinski pinskia at gcc dot gnu.org 2012-01-02 02:30:17 UTC --- I think the change to tree.c should not be done as it is middle-end code. That should be in the C++ front-end specific code instead. That is the middle-end

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

2011-09-15 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #34 from Marc Glisse marc.glisse at normalesup dot org 2011-09-15 16:53:33 UTC --- I posted a related demangler patch on gcc-patches a couple weeks ago, let me just link it from here so it doesn't get lost:

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

2011-09-04 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #33 from Marc Glisse marc.glisse at normalesup dot org 2011-09-04 11:03:41 UTC --- And if you don't like errors saying that X can't be converted to X, you'll need something like the below. I don't think I'll go much further anytime

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

2011-09-03 Thread marc.glisse at normalesup dot org
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

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

2011-08-31 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #31 from Marc Glisse marc.glisse at normalesup dot org 2011-08-31 13:40:28 UTC --- (In reply to comment #25) (In reply to comment #23) I think you can do it with a alias-declaration in an extern C block: extern C {

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

2011-08-30 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #21 from Jonathan Wakely redi at gcc dot gnu.org 2011-08-30 09:12:23 UTC --- Thanks, Marc! We can (and eventually should) fix anything in libstdc++ that incorrectly relies on this bug. Gthreads might be a little harder, but we could

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

2011-08-30 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #22 from Marc Glisse marc.glisse at normalesup dot org 2011-08-30 09:32:24 UTC --- (In reply to comment #21) I'll try your patch and see what, if anything, can be changed safely in libstdc++ right away. Thanks :-) Note that some

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

2011-08-30 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #23 from Jonathan Wakely redi at gcc dot gnu.org 2011-08-30 10:46:51 UTC --- (In reply to comment #22) Note that some things are painful to do right with extern C. For instance, the __stoa helper takes as argument a pointer to a

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

2011-08-30 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #24 from Jonathan Wakely redi at gcc dot gnu.org 2011-08-30 10:49:27 UTC --- (In reply to comment #23) I think you can do it with a alias-declaration in an extern C block: But that might have only worked when I tested it because

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

2011-08-30 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #25 from Marc Glisse marc.glisse at normalesup dot org 2011-08-30 11:28:48 UTC --- (In reply to comment #23) I think you can do it with a alias-declaration in an extern C block: extern C { templatetypename T using func_type

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

2011-08-30 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #26 from Jonathan Wakely redi at gcc dot gnu.org 2011-08-30 12:17:47 UTC --- (In reply to comment #25) (In reply to comment #23) We could solve it with an alternative syntax for language linkage using attributes: void f(

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

2011-08-30 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #27 from Jonathan Wakely redi at gcc dot gnu.org 2011-08-30 12:19:23 UTC --- this is DR13 btw http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#13 I don't know if that's been reconsidered now we have attributes

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

2011-08-30 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #28 from Marc Glisse marc.glisse at normalesup dot org 2011-08-30 12:34:20 UTC --- (In reply to comment #27) this is DR13 btw http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#13 I don't know if that's been reconsidered

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

2011-08-30 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 Marc Glisse marc.glisse at normalesup dot org changed: What|Removed |Added Attachment #25134|0 |1

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

2011-08-30 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #30 from Marc Glisse marc.glisse at normalesup dot org 2011-08-30 20:32:57 UTC --- (In reply to comment #29) New version that works with typedefs (I was forgetting extern C in the canonical type...). The patch also includes a

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

2011-08-29 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316 --- Comment #20 from Marc Glisse marc.glisse at normalesup dot org 2011-08-30 00:20:07 UTC --- Created attachment 25134 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=25134 remember linkage of a function type This is an extremely basic patch,

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

2009-11-11 Thread jason at gcc dot gnu dot org
--- Comment #19 from jason at gcc dot gnu dot org 2009-11-12 04:54 --- I was thinking that the ABI didn't distinguish between C and C++ function types, but I was wrong; it does specify a different mangling for extern C functions. The problem is that currently G++ only tracks language

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

2009-06-04 Thread pinskia at gcc dot gnu dot org
--- Comment #16 from pinskia at gcc dot gnu dot org 2009-06-04 14:36 --- *** Bug 40336 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added

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

2009-06-04 Thread paolo dot carlini at oracle dot com
--- Comment #17 from paolo dot carlini at oracle dot com 2009-06-04 14:49 --- Interestingly, the only current compiler I tried which actually accepts this (SunStudio) warns: 2316.C, line 8: Warning: function int(int(*)()) overloads extern C int(extern C int(*)()) because of different

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

2009-06-04 Thread marc dot glisse at normalesup dot org
--- Comment #18 from marc dot glisse at normalesup dot org 2009-06-05 04:22 --- (In reply to comment #17) I just checked, and the sunpro warning is overzealous. It is meant to catch cases where the programmer writes a declaration with one linkage and later provides a definition with

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

2006-12-04 Thread marc dot glisse at normalesup dot org
--- Comment #15 from marc dot glisse at normalesup dot org 2006-12-04 15:54 --- *** Bug 30062 has been marked as a duplicate of this bug. *** -- marc dot glisse at normalesup dot org changed: What|Removed |Added

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

2006-10-14 Thread gcc-bugzilla at kayari dot org
--- Comment #13 from gcc-bugzilla at kayari dot org 2006-10-15 03:24 --- If this ever gets fixed (which I hope it does) then maybe it should depend on -std=c++98 so this continues to work by default, or it will break a lot of code that incorrectly passes extern C++ functions to e.g.

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

2006-10-14 Thread Andrew Pinski
On Sun, 2006-10-15 at 03:24 +, gcc-bugzilla at kayari dot org wrote: --- Comment #13 from gcc-bugzilla at kayari dot org 2006-10-15 03:24 --- If this ever gets fixed (which I hope it does) then maybe it should depend on -std=c++98 so this continues to work by default, or it

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

2006-10-14 Thread pinskia at gmail dot com
--- Comment #14 from pinskia at gmail dot com 2006-10-15 03:29 --- Subject: Re: g++ fails to overload on language linkage On Sun, 2006-10-15 at 03:24 +, gcc-bugzilla at kayari dot org wrote: --- Comment #13 from gcc-bugzilla at kayari dot org 2006-10-15 03:24 --- If

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

2006-10-10 Thread pinskia at gcc dot gnu dot org
--- Comment #11 from pinskia at gcc dot gnu dot org 2006-10-10 16:33 --- *** Bug 29411 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added

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

2006-10-10 Thread bkoz at gcc dot gnu dot org
--- Comment #12 from bkoz at gcc dot gnu dot org 2006-10-10 20:07 --- adding ABI keyword as implementing this may change mangling for C functions. -- bkoz at gcc dot gnu dot org changed: What|Removed |Added

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

2006-09-12 Thread pinskia at gcc dot gnu dot org
--- Comment #10 from pinskia at gcc dot gnu dot org 2006-09-12 16:55 --- *** Bug 29038 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added

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

2006-07-07 Thread pinskia at gcc dot gnu dot org
--- Comment #9 from pinskia at gcc dot gnu dot org 2006-07-07 20:52 --- *** Bug 28308 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added

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

2005-09-11 Thread sebor at roguewave dot com
--- Additional Comments From sebor at roguewave dot com 2005-09-11 21:34 --- In reply to comment #6: The vanilla EDG eccp 3.5 compiles the test case w/o an error: $ eccp -v t.cpp ./a.out; echo $? Edison Design Group C/C++ Front End, version 3.5 (Nov 9 2004 20:00:33) Copyright

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

2005-09-09 Thread rguenth at gcc dot gnu dot org
--- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-09 12:56 --- EDG aggrees with gcc here. Maybe not a bug. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2316

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

2005-09-09 Thread gdr at integrable-solutions dot net
--- Additional Comments From gdr at integrable-solutions dot net 2005-09-09 14:27 --- Subject: Re: g++ fails to overload on language linkage rguenth at gcc dot gnu dot org [EMAIL PROTECTED] writes: | EDG aggrees with gcc here. Maybe not a bug. I don't know why I don't like that