]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/32112 (#'unbound_class_template' not supported by dump_decl#)
authorPaolo Carlini <pcarlini@suse.de>
Sat, 18 Aug 2007 10:07:42 +0000 (10:07 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sat, 18 Aug 2007 10:07:42 +0000 (10:07 +0000)
/cp
2007-08-18  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-18  Paolo Carlini  <pcarlini@suse.de>

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

From-SVN: r127609

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 b4df615743d86f8715f12c248a33b67660a8dca8..953f47eb81d90a413db0d7aa1aab3f193a012393 100644 (file)
@@ -1,3 +1,9 @@
+2007-08-18  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-10  Paolo Carlini  <pcarlini@suse.de>
 
        PR c++/17763
index 5ceca61a4cb30711b87ac2207586bc59e8cf3c94..5f6150aab76a367773f204abfa5e44b2103a1958 100644 (file)
@@ -204,6 +204,10 @@ pp_cxx_unqualified_id (cxx_pretty_printer *pp, tree t)
       pp_cxx_unqualified_id (pp, TEMPLATE_PARM_DECL (t));
       break;
 
+    case UNBOUND_CLASS_TEMPLATE:
+      pp_cxx_unqualified_id (pp, TYPE_NAME (t));
+      break;
+
     default:
       pp_unsupported_tree (pp, t);
       break;
index 1332b226e4f1df8e81c223194f683f4a304d6a34..fa25db7978d72a8cb14685fd8a41deca375534ce 100644 (file)
@@ -901,6 +901,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 e19281fd541a10a440192b823b82f90207f7d040..50cf8c961482c3fd51b21c7de4e14a6a9702fd58 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-18  Paolo Carlini  <pcarlini@suse.de>
+
+       PR c++/32112
+       * g++.dg/template/error26.C: New.
+
 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
 
        PR c++/32190
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" }