OSDN Git Service

* g++.old-deja/g++.other/eh4.C: Fix typo.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.other / syntax4.C
1 // Build don't link:
2
3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 22 June 2000 <nathan@codesourcery.com>
5
6 // Origin GNATS bug report 262 from Jeremy Sanders <jss@ast.cam.ac.uk>
7 // and several others. With templates, it's very easy to say something
8 // erroneous like
9 //    template class X::X<whatever>
10 // The culprit
11 //    ... class X::X ...
12 // caused us to ICE as we got confused about pushing and popping scopes.
13
14 class X {
15   X ();
16 };
17
18 class Y {
19   public:
20   typedef ::X W;
21   class Z;
22 };
23
24 class Y::Z {};
25 class Y::W  () {}  // ERROR - parse error
26 Y::W::X () {}