aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/ChangeLog10
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/g++.dg/template/ptrmem5.C25
3 files changed, 38 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 5ffb144..8cc2988 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,15 @@
2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
+ PR c++/10119
+ * error.c (dump_expr) [BASELINK]: Use dump_expr.
+ * pt.c (maybe_fold_nontype_args): New function.
+ (tsubst_copy) [SCOPE_REF]: Subst any template_id args.
+ [TEMPLATE_ID_EXPR]: Break out folding code, call it.
+ (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Call
+ maybe_fold_nontype_args.
+
+2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
+
PR c++/10026
* decl2.c (arg_assoc_type) [ERROR_MARK]: Don't die.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a402ba0..a5f853a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@
2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
+ PR c++/10119
+ * g++.dg/template/ptrmem5.C: New test.
+
PR c++/10026
* g++.dg/lookup/koenig1.C: New test.
diff --git a/gcc/testsuite/g++.dg/template/ptrmem5.C b/gcc/testsuite/g++.dg/template/ptrmem5.C
new file mode 100644
index 0000000..50a7e77
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/ptrmem5.C
@@ -0,0 +1,25 @@
+// { dg-do compile }
+
+// Copyright (C) 2003 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 24 Mar 2003 <nathan@codesourcery.com>
+
+// PR 10119 (part). We failed to tsubst the args of a template-id-expr
+
+template <class T, void (T::* const U)()> struct Good
+{
+ static int const value = 0;
+};
+
+struct A
+{
+ template <typename U> void good ()
+ {
+ int s_id = Good<A, &A::good<U> >::value;
+ }
+};
+
+
+int main()
+{
+ A().good<int>();
+}