1 // { dg-do compile }
2 // { dg-options "" }
3 
4 // Copyright (C) 2001, 2003 Free Software Foundation, Inc.
5 // Contributed by Nathan Sidwell 21 Mar 2002 <nathan@codesourcery.com>
6 
7 // PR 5507. Overzealous implicit typename warning
8 
9 template<typename _CharT>
10 class __ctype_abstract_base
11 {
12   typedef int mask;
13 };
14 
15 template<typename _CharT>
16 class ctype : public __ctype_abstract_base<_CharT>
17 {
18   typedef typename ctype::mask mask;
19 };
20 
21 template<typename _CharT>
22 class ctype2 : public __ctype_abstract_base<_CharT>
23 {
24   typedef mask mask; // { dg-error "does not name a type" "no type" }
25   // { dg-message "note" "note" { target *-*-* } .-1 }
26 };
27