aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.cc')
-rw-r--r--gcc/tree.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/tree.cc b/gcc/tree.cc
index dd919ff..2bbef2d 100644
--- a/gcc/tree.cc
+++ b/gcc/tree.cc
@@ -12047,10 +12047,12 @@ warn_deprecated_use (tree node, tree attr)
attr = DECL_ATTRIBUTES (node);
else if (TYPE_P (node))
{
- tree decl = TYPE_STUB_DECL (node);
+ tree decl = TYPE_STUB_DECL (TYPE_MAIN_VARIANT (node));
if (decl)
- attr = lookup_attribute ("deprecated",
- TYPE_ATTRIBUTES (TREE_TYPE (decl)));
+ {
+ node = TREE_TYPE (decl);
+ attr = TYPE_ATTRIBUTES (node);
+ }
}
}