Workaround for virtual function/dllimport bug, also patch guidance request

Jason Merrill jason@cygnus.com
Tue Dec 14 17:33:00 GMT 1999


I've checked this in:

1999-12-14  Jason Merrill  <jason@casey.cygnus.com>

	* decl2.c (import_export_class): Don't ignore dllimport.

Index: decl2.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl2.c,v
retrieving revision 1.287
diff -c -p -r1.287 decl2.c
*** decl2.c	1999/12/05 00:37:56	1.287
--- decl2.c	1999/12/15 01:31:26
*************** import_export_class (ctype)
*** 2458,2466 ****
  #ifdef VALID_MACHINE_TYPE_ATTRIBUTE
    /* FIXME this should really use some sort of target-independent macro.  */
    if (lookup_attribute ("dllimport", TYPE_ATTRIBUTES (ctype)))
!     import_export = -1;
    else if (lookup_attribute ("dllexport", TYPE_ATTRIBUTES (ctype)))
!     import_export = 1;
  #endif
  
    /* If we got -fno-implicit-templates, we import template classes that
--- 2458,2467 ----
  #ifdef VALID_MACHINE_TYPE_ATTRIBUTE
    /* FIXME this should really use some sort of target-independent macro.  */
    if (lookup_attribute ("dllimport", TYPE_ATTRIBUTES (ctype)))
!     /* Use -2 so we survive the MULTIPLE_SYMBOL_SPACES check below.  */
!     import_export = -2;
    else if (lookup_attribute ("dllexport", TYPE_ATTRIBUTES (ctype)))
!     import_export = 2;
  #endif
  
    /* If we got -fno-implicit-templates, we import template classes that


More information about the Gcc mailing list