aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i386/winnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/i386/winnt.c')
-rw-r--r--gcc/config/i386/winnt.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c
index f629d35570b..f6417aa30bf 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;
}
@@ -126,7 +135,7 @@ associated_type (decl)
return t;
}
-/* Return non-zero if DECL is a dllexport'd object. */
+/* Return nonzero if DECL is a dllexport'd object. */
int
i386_pe_dllexport_p (decl)
@@ -153,7 +162,7 @@ i386_pe_dllexport_p (decl)
return 0;
}
-/* Return non-zero if DECL is a dllimport'd object. */
+/* Return nonzero if DECL is a dllimport'd object. */
int
i386_pe_dllimport_p (decl)
@@ -184,7 +193,7 @@ i386_pe_dllimport_p (decl)
return 0;
}
-/* Return non-zero if SYMBOL is marked as being dllexport'd. */
+/* Return nonzero if SYMBOL is marked as being dllexport'd. */
int
i386_pe_dllexport_name_p (symbol)
@@ -193,7 +202,7 @@ i386_pe_dllexport_name_p (symbol)
return symbol[0] == '@' && symbol[1] == 'e' && symbol[2] == '.';
}
-/* Return non-zero if SYMBOL is marked as being dllimport'd. */
+/* Return nonzero if SYMBOL is marked as being dllimport'd. */
int
i386_pe_dllimport_name_p (symbol)
@@ -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);
@@ -584,7 +583,7 @@ i386_pe_asm_named_section (name, flags)
/* Mark a function appropriately. This should only be called for
functions for which we are not emitting COFF debugging information.
FILE is the assembler output file, NAME is the name of the
- function, and PUBLIC is non-zero if the function is globally
+ function, and PUBLIC is nonzero if the function is globally
visible. */
void