]> 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:08:03 +0000 (10:08 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sat, 18 Aug 2007 10:08:03 +0000 (10:08 +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: r127610

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 126b3f6a91124c5dba7d32a6c520d51e6da031ff..dcbef47211344aab50b351eaa397fbb3dfe98083 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 cdaf470ce26e2336ffbb3a111f917e8813c566ac..43cf5819bf06cafb64d579edb13bff5741e2c798 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 e1cdfcd0015e925804b79ebef9e0badaad9d71bd..58ebe42250f4c1ee72a34c82a86e168703813703 100644 (file)
@@ -895,6 +895,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 035e3efe8b8c6f73fb33a6202ecbc7653b3640ac..177640227cbf9c27b6ac2374e0cfbc03cafb6963 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-10  Paolo Carlini  <pcarlini@suse.de>
 
        PR c++/17763
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" }