This is the mail archive of the gcc@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]

Re: set_new_handler change


> >  > Did we intentionally change this behavior?
> > 
> > Yes.  set_new_handler is supposed to have C++ linkage.
> 
> What should be done with existing apps that were built with the old
> linkage?  A most useful example that comes to mind is NetScape.  This
> is a case where getting the application built using the new linkage
> may be difficult or impossible.

There are two possible interpretations of this:

1) I have Netscape source (OK, Mozilla).  Here, doing

	#include <new>

in any files referencing set_new_handler fixes the problem (the proper
declaration of set_new_handler is provided).  If the code explicitly
declares set_new_handler extern "C", that's a bug, remove the bug.

2) I have a dynamically linked Netscape binary.  But set_new_handler is
in libgcc.a, which is always statically linked.  Your old binary will
keep working.

So what is the problem?


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