aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2003-06-27 22:46:47 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2003-06-27 22:46:47 +0000
commitdce50630a39a2c30ea218efa600f2f8e28e069d6 (patch)
tree99f26d64cad359c092ab9b332a096f0da95e8ccd /gcc/cp
parent7a0ec6071b687c061bafa7d68d17bee4377bb618 (diff)
downloadgcc-dce50630a39a2c30ea218efa600f2f8e28e069d6.zip
gcc-dce50630a39a2c30ea218efa600f2f8e28e069d6.tar.gz
gcc-dce50630a39a2c30ea218efa600f2f8e28e069d6.tar.bz2
re PR c++/10468 (const typeof(x) is non-const, but only in templates)
PR c++/10468 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly. PR c++/10468 * g++.dg/ext/typeof5.C: New test. From-SVN: r68615
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/pt.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3e1fa5d..69242ca 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,10 @@
2003-06-27 Mark Mitchell <mark@codesourcery.com>
+ PR c++/10468
+ * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
+
+2003-06-27 Mark Mitchell <mark@codesourcery.com>
+
PR c++/10796
* decl.c (finish_enum): Implement DR377.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 282c788..75b3537 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -7062,7 +7062,10 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
if (e1 == error_mark_node)
return error_mark_node;
- return TREE_TYPE (e1);
+ return cp_build_qualified_type_real (TREE_TYPE (e1),
+ cp_type_quals (t)
+ | cp_type_quals (TREE_TYPE (e1)),
+ complain);
}
default: