OSDN Git Service

PR c++/16175
authorlerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Jul 2004 16:02:13 +0000 (16:02 +0000)
committerlerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Jul 2004 16:02:13 +0000 (16:02 +0000)
* error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
cv qualifier.

* g++.dg/template/ttp10.C: New test.

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

gcc/cp/ChangeLog
gcc/cp/error.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/ttp10.C [new file with mode: 0644]

index 2cf92d0..c05d91f 100644 (file)
@@ -1,3 +1,9 @@
+2004-07-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/16175
+       * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
+       cv qualifier.
+
 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/16623
index 6fa99a7..cf1bf39 100644 (file)
@@ -316,6 +316,7 @@ dump_type (tree t, int flags)
     case BOUND_TEMPLATE_TEMPLATE_PARM:
       {
        tree args = TYPE_TI_ARGS (t);
+       pp_cxx_cv_qualifier_seq (cxx_pp, t);
        pp_cxx_tree_identifier (cxx_pp, TYPE_IDENTIFIER (t));
        pp_cxx_begin_template_argument_list (cxx_pp);
         dump_template_argument_list (args, flags);
index a45e857..64de9d5 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/16175
+       * g++.dg/template/ttp10.C: New test.
+
 2004-07-20  Joseph S. Myers  <jsm@polyomino.org.uk>
 
        * gcc.dg/pr12625-1.c: New test.
diff --git a/gcc/testsuite/g++.dg/template/ttp10.C b/gcc/testsuite/g++.dg/template/ttp10.C
new file mode 100644 (file)
index 0000000..09bdb1a
--- /dev/null
@@ -0,0 +1,21 @@
+// { dg-do compile }
+
+// Origin: Ivan Godard <igodard@pacbell.net>
+//        Wolfgang Bangerth <bangerth@ticam.utexas.edu>
+
+// PR c++/16175: Missing cv qualifier in error message output
+
+template <typename> struct Template {}; 
+template<template<typename> class D> 
+struct B { 
+    static void foo1(const D<void> *); // { dg-error "const" }
+    static void foo2(volatile D<void> *);// { dg-error "volatile" }
+}; 
+class E : protected B<Template> {}; 
+void bar() {
+  E::foo1 (0);                         // { dg-error "context" }
+  E::foo2 (0);                         // { dg-error "context" }
+}