summaryrefslogtreecommitdiff
path: root/gcc/config/darwin.c
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-03 23:26:54 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-03 23:26:54 +0000
commitd0ddd54818ae85af0453afc744db8e8f7c51d17a (patch)
tree715b198064e6dd14dd879b254826896000dafdf4 /gcc/config/darwin.c
parent619bb5527f2ff8acf15471c968cfd50ca7c4a942 (diff)
downloadgcc-d0ddd54818ae85af0453afc744db8e8f7c51d17a.tar.gz
2005-01-03 Geoffrey Keating <geoffk@apple.com>
* config/darwin.c (darwin_handle_weak_import_attribute): Permit VAR_DECLs to have weak_import attribute. Index: testsuite/ChangeLog 2005-01-03 Geoffrey Keating <geoffk@apple.com> * gcc.dg/darwin-weakimport-1.c: Remove check for variables producing warning. * gcc.dg/darwin-weakimport-2.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92871 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/darwin.c')
-rw-r--r--gcc/config/darwin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 4738fee911c..b95c438988e 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -1228,7 +1228,7 @@ darwin_handle_weak_import_attribute (tree *node, tree name,
int ARG_UNUSED (flags),
bool * no_add_attrs)
{
- if (TREE_CODE (*node) != FUNCTION_DECL)
+ if (TREE_CODE (*node) != FUNCTION_DECL && TREE_CODE (*node) != VAR_DECL)
{
warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
*no_add_attrs = true;