Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.old-deja / g++.oliva / typename2.C
blob86512c983f4ef418b0e30da001864ee91604f45a
1 // { dg-do assemble  }
2 // { dg-options "" }
4 // Copyright (C) 1999 Free Software Foundation
6 // by Alexandre Oliva <oliva@dcc.unicamp.br>
7 // based on bug report by Nick Rasmussen <nick@jive.org>
9 // This is slightly different from typename1.C.  This one tests
10 // whether the implicit typename extension works.  gcc 2.95 reports:
12 // warning: lookup of `foo' finds `struct foo'
13 // warning:   instead of `baz<T>::foo' from dependent base class
14 // warning:   (use `typename baz::foo' if that's what you meant)
16 // But baz<T>::foo is not a base class, and `foo' should have been
17 // found in baz's scope.
19 struct foo;
21 template <class T> struct bar {
22   typedef int foo;
25 template <class T> struct baz {
26   typedef bar<T>::foo foo; // { dg-error "" } implicit typename
27   void m(foo);