diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2004-11-29 23:11:30 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2004-11-29 15:11:30 -0800 |
commit | e8233ac225ad6b380cdca254e7646cb5b9f917e2 (patch) | |
tree | 8c3481e8e9d2fd6644e0eecf3646b6d06ab92e0b /gcc/c-common.c | |
parent | 693ac16709fa7198d0c2dc33c296ed2ca43686ad (diff) | |
download | gcc-e8233ac225ad6b380cdca254e7646cb5b9f917e2.zip gcc-e8233ac225ad6b380cdca254e7646cb5b9f917e2.tar.gz gcc-e8233ac225ad6b380cdca254e7646cb5b9f917e2.tar.bz2 |
re PR c/18479 (__attribute__ ((visibility("default"))) in C causes internal compiler error)
2004-11-29 Andrew Pinski <pinskia@physics.uc.edu>
PR c/18479
* gcc.dg/pr18479.c: New test.
2004-11-29 Andrew Pinski <pinskia@physics.uc.edu>
PR c/18479
* c-common.c (handle_visibility_attribute): When the type decl
is really a identifier node, warn about being ignored and return.
From-SVN: r91492
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index bfefeb2..62aaa27 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -4571,6 +4571,12 @@ handle_visibility_attribute (tree *node, tree name, tree args, decl = TYPE_NAME (decl); if (!decl) return NULL_TREE; + if (TREE_CODE (decl) == IDENTIFIER_NODE) + { + warning ("%qE attribute ignored on types", + name); + return NULL_TREE; + } } if (strcmp (TREE_STRING_POINTER (id), "default") == 0) |