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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91492
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
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)
+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
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "" } */
+struct __attribute__ ((visibility("default"))) Foo { int foo; }; /* { dg-warning "attribute ignored on types" } */