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
This commit is contained in:
parent
693ac16709
commit
e8233ac225
4 changed files with 20 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
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.
|
||||
|
||||
2004-11-29 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* tree-cfg.c (tree_node_can_be_shared): Fix typo'd error_mark_node.
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2004-11-29 Andrew Pinski <pinskia@physics.uc.edu>
|
||||
|
||||
PR c/18479
|
||||
* gcc.dg/pr18479.c: New test.
|
||||
|
||||
2004-11-29 Hans-Peter Nilsson <hp@bitrange.com>
|
||||
|
||||
PR target/18490
|
||||
|
|
3
gcc/testsuite/gcc.dg/pr18479.c
Normal file
3
gcc/testsuite/gcc.dg/pr18479.c
Normal file
|
@ -0,0 +1,3 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "" } */
|
||||
struct __attribute__ ((visibility("default"))) Foo { int foo; }; /* { dg-warning "attribute ignored on types" } */
|
Loading…
Add table
Reference in a new issue