Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.law/scope1.C

raw
1 // { dg-do assemble }
2 // GROUPS passed scoping
3 // scoping file
4 // From: [email protected] (Nikolay Yatsenko)
5 // Date: Fri, 16 Jul 1993 18:48:32 -0400
6 // Subject: g++ gives wrong error for local structure
7 // Message-ID: <[email protected]>
8
9 int main(void)
10 {
11 struct A{
12 public: int i;
13 void set (int i)
14 {A::i = i;} // g++ gives wrong error
15 };
16
17 A a;
18 a.set(17);
19 return 0;
20 }