aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/typename2.C
blob: b0e16d46434e8ced2b6cd5edccd20eb4a849f658 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// { dg-do compile }
// { dg-options "" }

// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 21 Mar 2002 <nathan@codesourcery.com>

// PR 5507. Overzealous implicit typename warning

template<typename _CharT>
class __ctype_abstract_base
{
  typedef int mask;
};

template<typename _CharT>
class ctype : public __ctype_abstract_base<_CharT>
{
  typedef typename ctype::mask mask;
};

template<typename _CharT>
class ctype2 : public __ctype_abstract_base<_CharT>
{
  typedef mask mask; // { dg-error "does not name a type" "no type" }
  // { dg-message "note" "note" { target *-*-* } 24 }
};