diff options
author | Jason Merrill <jason@redhat.com> | 2002-09-16 18:17:31 -0400 |
---|---|---|
committer | Danny Smith <dannysmith@gcc.gnu.org> | 2002-09-16 22:17:31 +0000 |
commit | f354b82835d441a9430484561f45ad2cfff6d0bc (patch) | |
tree | a70841d074b2bc9ceab57521b4fa5f810afe06eb /gcc | |
parent | e46b54a2b95ef8afa5ba8fffc39e48eee4f8aa86 (diff) | |
download | gcc-f354b82835d441a9430484561f45ad2cfff6d0bc.zip gcc-f354b82835d441a9430484561f45ad2cfff6d0bc.tar.gz gcc-f354b82835d441a9430484561f45ad2cfff6d0bc.tar.bz2 |
winnt.c (ix86_handle_dll_attribute): Set DECL_EXTERN and TREE_PUBLIC for dllimported variables here...
* config/i386/winnt.c (ix86_handle_dll_attribute): Set
DECL_EXTERN and TREE_PUBLIC for dllimported variables here...
(i386_pe_mark_dllimport): Not here.
Co-Authored-By: Danny Smith <dannysmith@users.sourceforge.net>
From-SVN: r57215
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/i386/winnt.c | 19 |
2 files changed, 16 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7aaf2c7..10ff912 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2002-09-16 Jason Merrill <jason@redhat.com> + Danny Smith <dannysmith@users.sourceforge.net> + + * config/i386/winnt.c (ix86_handle_dll_attribute): Set + DECL_EXTERN and TREE_PUBLIC for dllimported variables here... + (i386_pe_mark_dllimport): Not here. + 2002-09-16 Nathan Sidwell <nathan@codesourcery.com> * c-semantics.c (genrtl_do_stmt): Cope with NULL cond. diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c index f629d35..346a635 100644 --- a/gcc/config/i386/winnt.c +++ b/gcc/config/i386/winnt.c @@ -78,6 +78,15 @@ ix86_handle_dll_attribute (node, name, args, flags, no_add_attrs) } } + /* `extern' needn't be specified with dllimport. + Specify `extern' now and hope for the best. Sigh. */ + else if (TREE_CODE (*node) == VAR_DECL + && is_attribute_p ("dllimport", name)) + { + DECL_EXTERNAL (*node) = 1; + TREE_PUBLIC (*node) = 1; + } + return NULL_TREE; } @@ -302,16 +311,6 @@ i386_pe_mark_dllimport (decl) return; } - /* `extern' needn't be specified with dllimport. - Specify `extern' now and hope for the best. Sigh. */ - if (TREE_CODE (decl) == VAR_DECL - /* ??? Is this test for vtables needed? */ - && !DECL_VIRTUAL_P (decl)) - { - DECL_EXTERNAL (decl) = 1; - TREE_PUBLIC (decl) = 1; - } - newname = alloca (strlen (oldname) + 11); sprintf (newname, "@i._imp__%s", oldname); |