Commit d5648e12 by Danny Smith Committed by Danny Smith

winnt.c (associated_type): Artificial methods are not affected by the…

winnt.c (associated_type): Artificial methods are not affected by the import/export status of their class...

	* config/i386/winnt.c (associated_type): Artificial methods are not
	affected by the import/export status of their class unless they are
	COMDAT.
	(i386_pe_dllimport_p): Do not mark artificial methods as dllimport.

	* config/i386/winnt.c: Fix GCC copyright comment.

From-SVN: r69431
parent e2766830
2003-07-16 Danny Smith <dannysmith@users.sourceforge.net>
* config/i386/winnt.c (associated_type): Artificial methods are not
affected by the import/export status of their class unless they are
COMDAT.
(i386_pe_dllimport_p): Do not mark artificial methods as dllimport.
* config/i386/winnt.c: Fix GCC copyright comment.
2003-07-16 Gabriel Dos Reis <gcc@integrable-solutions.net> 2003-07-16 Gabriel Dos Reis <gcc@integrable-solutions.net>
PR c++/11531 PR c++/11531
......
...@@ -16,10 +16,9 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ...@@ -16,10 +16,9 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
along with GNU CC; see the file COPYING. If not, write to Software Foundation, 59 Temple Place - Suite 330, Boston, MA
the Free Software Foundation, 59 Temple Place - Suite 330, 02111-1307, USA. */
Boston, MA 02111-1307, USA. */
#include "config.h" #include "config.h"
#include "system.h" #include "system.h"
...@@ -174,9 +173,11 @@ associated_type (decl) ...@@ -174,9 +173,11 @@ associated_type (decl)
to the containing class. So we look at the 'this' arg. */ to the containing class. So we look at the 'this' arg. */
if (TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE) if (TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE)
{ {
/* Artificial methods are not affected by the import/export status of /* Artificial methods are not affected by the import/export status
their class unless they are virtual. */ of their class unless they are COMDAT. Implicit copy ctor's and
if (! DECL_ARTIFICIAL (decl) || DECL_VINDEX (decl)) dtor's are not affected by class status but virtual and
non-virtual thunks are. */
if (!DECL_ARTIFICIAL (decl) || DECL_COMDAT (decl))
t = TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (decl)))); t = TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (decl))));
} }
else if (DECL_CONTEXT (decl) else if (DECL_CONTEXT (decl)
...@@ -279,9 +280,11 @@ i386_pe_dllimport_p (decl) ...@@ -279,9 +280,11 @@ i386_pe_dllimport_p (decl)
/* Since we can't treat a pointer to a dllimport'd symbol as a /* Since we can't treat a pointer to a dllimport'd symbol as a
constant address, we turn off the attribute on C++ virtual constant address, we turn off the attribute on C++ virtual
methods to allow creation of vtables using thunks. */ methods to allow creation of vtables using thunks. Don't mark
artificial methods either (in associated_type, only COMDAT
artificial method get import status from class context). */
else if (TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE else if (TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE
&& (DECL_VIRTUAL_P (decl))) && (DECL_VIRTUAL_P (decl) || DECL_ARTIFICIAL (decl)))
return 0; return 0;
return 1; return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment