/cp
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Aug 2007 20:46:59 +0000 (20:46 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Aug 2007 20:46:59 +0000 (20:46 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127596 138bc75d-0d04-0410-961f-82ee72b054a4

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 15e1819..f01075d 100644 (file)
@@ -1,5 +1,11 @@
 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
        * parser.c (cp_parser_class_head): Improve error message.
 
index 1b15102..18983a4 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 404fbd0..53d8223 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 7ababfa..7326e7d 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" }