re PR c++/16175 (Wrong type reported in diagnostic)

PR c++/16175
	* error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
	cv qualifier.

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

From-SVN: r84961
This commit is contained in:
Kriang Lerdsuwanakij 2004-07-20 16:02:13 +00:00 committed by Kriang Lerdsuwanakij
parent 8246c7784b
commit e9f7dd36d5
4 changed files with 33 additions and 0 deletions

View 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

View 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);

View 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.

View File

@ -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" }
}