diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2003-07-16 01:04:10 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@gcc.gnu.org> | 2003-07-16 01:04:10 +0000 |
commit | d5648e1233d6edd46046ef626a73b8a1d598c4ac (patch) | |
tree | 7adccc27757222f23f3724f7c04eeff7c304e41c /gcc | |
parent | e27668301c851b3e945f092bcd7c31a9da2cf3ff (diff) | |
download | gcc-d5648e1233d6edd46046ef626a73b8a1d598c4ac.zip gcc-d5648e1233d6edd46046ef626a73b8a1d598c4ac.tar.gz gcc-d5648e1233d6edd46046ef626a73b8a1d598c4ac.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/i386/winnt.c | 21 |
2 files changed, 21 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 24c45c7..c8b853f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +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> PR c++/11531 diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c index 2c1e47f..a2219bd 100644 --- a/gcc/config/i386/winnt.c +++ b/gcc/config/i386/winnt.c @@ -16,10 +16,9 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - -along with GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ +along with GCC; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. */ #include "config.h" #include "system.h" @@ -174,9 +173,11 @@ associated_type (decl) to the containing class. So we look at the 'this' arg. */ if (TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE) { - /* Artificial methods are not affected by the import/export status of - their class unless they are virtual. */ - if (! DECL_ARTIFICIAL (decl) || DECL_VINDEX (decl)) + /* Artificial methods are not affected by the import/export status + of their class unless they are COMDAT. Implicit copy ctor's and + 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)))); } else if (DECL_CONTEXT (decl) @@ -279,9 +280,11 @@ i386_pe_dllimport_p (decl) /* Since we can't treat a pointer to a dllimport'd symbol as a 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 - && (DECL_VIRTUAL_P (decl))) + && (DECL_VIRTUAL_P (decl) || DECL_ARTIFICIAL (decl))) return 0; return 1; |