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

C++ PATCH: Yet another weak linkage thing


This patch fixes one more problem with systems that do not have weak
linkage.

Tested by me on i686-pc-linux-gnu, and by David Edelsohn on AIX;
applied on the mainline and on the branch.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com

2003-05-01  Mark Mitchell  <mark@codesourcery.com>

	* decl2.c (comdat_linkage): Don't externalize explicit
	instantiations.

Index: decl2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl2.c,v
retrieving revision 1.621
diff -c -5 -p -r1.621 decl2.c
*** decl2.c	26 Apr 2003 20:22:12 -0000	1.621
--- decl2.c	1 May 2003 15:34:26 -0000
*************** comdat_linkage (tree decl)
*** 1452,1462 ****
        else if (EMPTY_CONSTRUCTOR_P (DECL_INITIAL (decl)))
  	{
  	  DECL_COMMON (decl) = 1;
  	  DECL_INITIAL (decl) = error_mark_node;
  	}
!       else
  	{
  	  /* We can't do anything useful; leave vars for explicit
  	     instantiation.  */
  	  DECL_EXTERNAL (decl) = 1;
  	  DECL_NOT_REALLY_EXTERN (decl) = 0;
--- 1452,1462 ----
        else if (EMPTY_CONSTRUCTOR_P (DECL_INITIAL (decl)))
  	{
  	  DECL_COMMON (decl) = 1;
  	  DECL_INITIAL (decl) = error_mark_node;
  	}
!       else if (!DECL_EXPLICIT_INSTANTIATION (decl))
  	{
  	  /* We can't do anything useful; leave vars for explicit
  	     instantiation.  */
  	  DECL_EXTERNAL (decl) = 1;
  	  DECL_NOT_REALLY_EXTERN (decl) = 0;


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