diff options
author | dannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-20 23:27:05 +0000 |
---|---|---|
committer | dannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-20 23:27:05 +0000 |
commit | d7db2b38a08bbf4573e292719b0f7a0d56afef2e (patch) | |
tree | 074e7c0e511e2707eeadd787851db0351973d428 | |
parent | 15ea25ad7ac2ec6424e17058c02e18790e0f941d (diff) | |
download | gcc-d7db2b38a08bbf4573e292719b0f7a0d56afef2e.tar.gz |
PR target/27650
* class.c (check_for_override): Remove dllimport from virtual
methods.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117096 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/class.c | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a5d403a600f..fed109fe50e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2006-09-20 Danny Smith <dannysmith@users.sourceforge.net> + + PR target/27650 + * class.c (check_for_override): Remove dllimport from virtual + methods. + 2006-09-18 Steven Bosscher <steven@gcc.gnu.org> PR c++/29087 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 7361b5a1ba9..fa11606f2d1 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -2342,6 +2342,16 @@ check_for_override (tree decl, tree ctype) if (!DECL_VINDEX (decl)) DECL_VINDEX (decl) = error_mark_node; IDENTIFIER_VIRTUAL_P (DECL_NAME (decl)) = 1; + if (DECL_DLLIMPORT_P (decl)) + { + /* When we handled the dllimport attribute we may not have known + that this function is virtual We can't use dllimport + semantics for a virtual method because we need to initialize + the vtable entry with a constant address. */ + DECL_DLLIMPORT_P (decl) = 0; + DECL_ATTRIBUTES (decl) + = remove_attribute ("dllimport", DECL_ATTRIBUTES (decl)); + } } } |