From: Jason Merrill Date: Thu, 26 Aug 1999 02:19:26 +0000 (+0000) Subject: tree.c (cp_build_qualified_type_real): If we're asking for the same quals we already... X-Git-Tag: prereleases/libstdc++-2.92~11025 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e271912d4b0c0c078f5e4260bde5b196520de79e;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 72cc6a5629ea..3395ca971b2d 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 860dd0fffda3..8c1ff3f171aa 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)