diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-01-10 11:44:46 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-01-10 11:44:46 +0100 |
commit | dbf02a2cd6652a1e95cce0ea5035ac394c023a00 (patch) | |
tree | 0c6e9a3f9150b451f7b5ba1154b3e27a12171b0c /gcc/attribs.c | |
parent | aa6c5afeb2d99d66b129f5568dfc1e9fa7dcf8f8 (diff) | |
download | gcc-dbf02a2cd6652a1e95cce0ea5035ac394c023a00.zip gcc-dbf02a2cd6652a1e95cce0ea5035ac394c023a00.tar.gz gcc-dbf02a2cd6652a1e95cce0ea5035ac394c023a00.tar.bz2 |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/attribs.c b/gcc/attribs.c index d9b6a04..408f920 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) |