aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index b943b83..15be5d7 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -501,18 +501,8 @@ tree
canonical_type_variant (t)
tree t;
{
- int constp, volatilep;
- if (TREE_CODE (t) == ARRAY_TYPE)
- {
- constp = TYPE_READONLY (TREE_TYPE (t));
- volatilep = TYPE_VOLATILE (TREE_TYPE (t));
- }
- else
- {
- constp = TYPE_READONLY (t);
- volatilep = TYPE_VOLATILE (t);
- }
- return cp_build_type_variant (TYPE_MAIN_VARIANT (t), constp, volatilep);
+ return cp_build_type_variant (TYPE_MAIN_VARIANT (t), CP_TYPE_READONLY (t),
+ CP_TYPE_VOLATILE (t));
}
/* Add OFFSET to all base types of T.