PR target/33963
* tree.c (handle_dll_attribute): Disallow TYPE_DECLs for types
other than structures and unions.
From-SVN: r132744
+2008-02-28 Joseph Myers <joseph@codesourcery.com>
+
+ PR target/33963
+ * tree.c (handle_dll_attribute): Disallow TYPE_DECLs for types
+ other than structures and unions.
+
2008-02-28 Richard Guenther <rguenther@suse.de>
Revert:
return NULL_TREE;
}
+ if (TREE_CODE (node) == TYPE_DECL
+ && TREE_CODE (TREE_TYPE (node)) != RECORD_TYPE
+ && TREE_CODE (TREE_TYPE (node)) != UNION_TYPE)
+ {
+ *no_add_attrs = true;
+ warning (OPT_Wattributes, "%qs attribute ignored",
+ IDENTIFIER_POINTER (name));
+ return NULL_TREE;
+ }
+
/* Report error on dllimport ambiguities seen now before they cause
any damage. */
else if (is_attribute_p ("dllimport", name))