aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1999-08-26 02:19:26 +0000
committerJason Merrill <jason@gcc.gnu.org>1999-08-25 22:19:26 -0400
commite271912d4b0c0c078f5e4260bde5b196520de79e (patch)
tree7b576882b4086574d97f4e992e445a118436897b /gcc
parent5879933a92e9b01b6233b8e9c276446cc5ef0734 (diff)
downloadgcc-e271912d4b0c0c078f5e4260bde5b196520de79e.zip
gcc-e271912d4b0c0c078f5e4260bde5b196520de79e.tar.gz
gcc-e271912d4b0c0c078f5e4260bde5b196520de79e.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/tree.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 72cc6a5..3395ca9 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
+
+ * 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 <mark@codesourcery.com>
* cp-tree.def (SUBOBJECT): New tree node.
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 860dd0f..8c1ff3f 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)