summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/typedef8.C
blob: 2d3507acc98f9481c849db9a273d449dca364a22 (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 assemble  }
// 
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 17 Aug 2000 <nathan@codesourcery.com>

// bug 39. We'd generated bogus errors when using a typedef of a nested class.

struct X1
{
  typedef struct {
  } MyStruct1;
  typedef struct M2 {
  } MyStruct2;
};

X1::MyStruct1 foo()
{
X1::MyStruct1 m1;
return m1;
}

X1::MyStruct2 baz()
{
X1::MyStruct2 m1;
return m1;
}