Index: c-common.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/c-common.c,v retrieving revision 1.588 diff -u -p -r1.588 c-common.c --- c-common.c 25 Nov 2004 17:11:17 -0000 1.588 +++ c-common.c 26 Nov 2004 00:45:41 -0000 @@ -4571,6 +4571,12 @@ handle_visibility_attribute (tree *node, decl = TYPE_NAME (decl); if (!decl) return NULL_TREE; + if (TREE_CODE (decl) == IDENTIFIER_NODE) + { + warning ("%qs attribute ignored on types", + IDENTIFIER_POINTER (name)); + return NULL_TREE; + } } if (strcmp (TREE_STRING_POINTER (id), "default") == 0)