diff options
Diffstat (limited to 'cross/i386-netbsdpe/patches/patch-de')
-rw-r--r-- | cross/i386-netbsdpe/patches/patch-de | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/cross/i386-netbsdpe/patches/patch-de b/cross/i386-netbsdpe/patches/patch-de new file mode 100644 index 00000000000..6778f128899 --- /dev/null +++ b/cross/i386-netbsdpe/patches/patch-de @@ -0,0 +1,46 @@ +$NetBSD: patch-de,v 1.1 2001/10/21 12:24:16 kent Exp $ + +--- gcc/cp/decl.c~ Tue Mar 27 22:17:25 2001 ++++ gcc/cp/decl.c +@@ -10266,8 +10266,18 @@ + ignore_attrs = 0; + else if (inner_attrs) + { +- decl_attributes (type, inner_attrs, NULL_TREE); +- inner_attrs = NULL_TREE; ++ /*decl_attributes (type, inner_attrs, NULL_TREE);*/ ++ /* Create a dummy decl to pass to decl_attributes. The ++ attributes will be added to a variant of type, and this ++ new variant type can be retrieved from the dummy decl. ++ Passing type directly causes the attributes to be added ++ to type, which is wrong because type may be used ++ elsewhere without attributes. */ ++ ++ tree dummy = build_decl (TYPE_DECL, NULL_TREE, type); ++ decl_attributes (dummy, inner_attrs, NULL_TREE); ++ type = TREE_TYPE (dummy); ++ inner_attrs = NULL_TREE; + } + + switch (TREE_CODE (declarator)) +@@ -10969,7 +10979,19 @@ + if (inner_attrs) + { + if (! ignore_attrs) +- decl_attributes (type, inner_attrs, NULL_TREE); ++ /*decl_attributes (type, inner_attrs, NULL_TREE);*/ ++ { ++ /* Create a dummy decl to pass to decl_attributes. The ++ attributes will be added to a variant of type, and this ++ new variant type can be retrieved from the dummy decl. ++ Passing type directly causes the attributes to be added ++ to type, which is wrong because type may be used ++ elsewhere without attributes. */ ++ ++ tree dummy = build_decl (TYPE_DECL, NULL_TREE, type); ++ decl_attributes (dummy, inner_attrs, NULL_TREE); ++ type = TREE_TYPE (dummy); ++ } + else if (attrlist) + TREE_VALUE (attrlist) = chainon (inner_attrs, TREE_VALUE (attrlist)); + else |