summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/scope1.C
blob: 062fc4010c04a22a5999230e2c4286fd661fa0fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do assemble  }
// GROUPS passed scoping
// scoping file
// From: kol@world.std.com (Nikolay Yatsenko)
// Date:     Fri, 16 Jul 1993 18:48:32 -0400
// Subject:  g++ gives wrong error for local structure
// Message-ID: <199307162248.AA05360@world.std.com>

int main(void)
{
  struct A{
  public:       int i;
    void set (int i)
      {A::i = i;}           // g++ gives wrong error
  };

  A a;
  a.set(17);
  return 0;
}