re PR c++/32112 (#'unbound_class_template' not supported by dump_decl#)
authorPaolo Carlini <pcarlini@suse.de>
Fri, 17 Aug 2007 20:46:59 +0000 (20:46 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 17 Aug 2007 20:46:59 +0000 (20:46 +0000)
/cp
2007-08-17  Paolo Carlini  <pcarlini@suse.de>

PR c++/32112
* error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
* cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.

/testsuite
2007-08-17  Paolo Carlini  <pcarlini@suse.de>

PR c++/32112
* g++.dg/template/error26.C: New.

From-SVN: r127596

gcc/cp/ChangeLog
gcc/cp/cxx-pretty-print.c
gcc/cp/error.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/error26.C [new file with mode: 0644]

index 15e1819d09e26396cb6dcbab0d91903588176508..f01075db59131da512d9bcb3cf2f5166fe88c7fa 100644 (file)
@@ -1,3 +1,9 @@
+2007-08-17  Paolo Carlini  <pcarlini@suse.de>
+
+       PR c++/32112
+       * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
+       * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
+
 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
 
        PR c++/32870
index 1b15102922f520797fb01193d36fb8cab526b839..18983a4b267797940df1d8ddbd24ac42e3bbcb8f 100644 (file)
@@ -206,6 +206,7 @@ pp_cxx_unqualified_id (cxx_pretty_printer *pp, tree t)
       break;
 
     case TYPENAME_TYPE:
+    case UNBOUND_CLASS_TEMPLATE:
       pp_cxx_unqualified_id (pp, TYPE_NAME (t));
       break;
 
index 404fbd06596c326bd179985101608d4f985bc400..53d8223a8d2c36e3d6d5d576fe610d4d70467ce5 100644 (file)
@@ -962,6 +962,10 @@ dump_decl (tree t, int flags)
        pp_type_id (cxx_pp, t);
       break;
 
+    case UNBOUND_CLASS_TEMPLATE:
+      dump_type (t, flags);
+      break;
+
     default:
       pp_unsupported_tree (cxx_pp, t);
       /* Fall through to error.  */
index 7ababfa2c4c5cc7d796a276a9864c953e4f42810..7326e7dd1287b7df7a391812f9b85dfe70070c9f 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-17  Paolo Carlini  <pcarlini@suse.de>
+
+       PR c++/32112
+       * g++.dg/template/error26.C: New.
+
 2007-08-17  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
        PR fortran/33079
diff --git a/gcc/testsuite/g++.dg/template/error26.C b/gcc/testsuite/g++.dg/template/error26.C
new file mode 100644 (file)
index 0000000..7545762
--- /dev/null
@@ -0,0 +1,5 @@
+// PR c++/32112
+
+template<typename> struct A;
+
+template<typename T> void foo (A<&T::template i>); // { dg-error "T::template i|mismatch|& T::i" }