summaryrefslogtreecommitdiff
path: root/gcc/attribs.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-01-10 11:44:46 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-01-10 11:44:46 +0100
commitdbf02a2cd6652a1e95cce0ea5035ac394c023a00 (patch)
tree0c6e9a3f9150b451f7b5ba1154b3e27a12171b0c /gcc/attribs.c
parentaa6c5afeb2d99d66b129f5568dfc1e9fa7dcf8f8 (diff)
re PR c/88568 ('dllimport' no longer implies 'extern' in C)
PR c/88568 * attribs.c (handle_dll_attribute): Clear TREE_STATIC after setting DECL_EXTERNAL. * gcc.dg/pr88568.c: New test. From-SVN: r267799
Diffstat (limited to 'gcc/attribs.c')
-rw-r--r--gcc/attribs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/attribs.c b/gcc/attribs.c
index d9b6a04f87a..408f920dc60 100644
--- a/gcc/attribs.c
+++ b/gcc/attribs.c
@@ -1691,6 +1691,8 @@ handle_dll_attribute (tree * pnode, tree name, tree args, int flags,
a function global scope, unless declared static. */
if (current_function_decl != NULL_TREE && !TREE_STATIC (node))
TREE_PUBLIC (node) = 1;
+ /* Clear TREE_STATIC because DECL_EXTERNAL is set. */
+ TREE_STATIC (node) = 0;
}
if (*no_add_attrs == false)