From e271912d4b0c0c078f5e4260bde5b196520de79e Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 26 Aug 1999 02:19:26 +0000 Subject: [PATCH] tree.c (cp_build_qualified_type_real): If we're asking for the same quals we already have, just return. * tree.c (cp_build_qualified_type_real): If we're asking for the same quals we already have, just return. From-SVN: r28886 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/tree.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 72cc6a5629e..3395ca971b2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +1999-08-25 Jason Merrill + + * tree.c (cp_build_qualified_type_real): If we're asking for the + same quals we already have, just return. + 1999-08-25 Mark Mitchell * cp-tree.def (SUBOBJECT): New tree node. diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 860dd0fffda..8c1ff3f171a 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -508,7 +508,10 @@ cp_build_qualified_type_real (type, type_quals, complain) if (type == error_mark_node) return type; - + + if (type_quals == TYPE_QUALS (type)) + return type; + /* A restrict-qualified pointer type must be a pointer (or reference) to object or incomplete type. */ if ((type_quals & TYPE_QUAL_RESTRICT) -- 2.30.2