re PR c++/16175 (Wrong type reported in diagnostic)
[gcc.git] / gcc / testsuite / g++.dg / template / ttp10.C
1 // { dg-do compile }
2
3 // Origin: Ivan Godard <igodard@pacbell.net>
4 // Wolfgang Bangerth <bangerth@ticam.utexas.edu>
5
6 // PR c++/16175: Missing cv qualifier in error message output
7
8 template <typename> struct Template {};
9
10 template<template<typename> class D>
11 struct B {
12 static void foo1(const D<void> *); // { dg-error "const" }
13 static void foo2(volatile D<void> *);// { dg-error "volatile" }
14 };
15
16 class E : protected B<Template> {};
17
18 void bar() {
19 E::foo1 (0); // { dg-error "context" }
20 E::foo2 (0); // { dg-error "context" }
21 }