FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.martin / eval1.C
blobad7f2e478c4cf6c7bf87dc5ba58a9e237b22c1e6
1 // Postfix expression must be evaluated even if accessing a static member.
3 struct S
5         static int i;
6         S* foo();
7 };
9 S* S::foo(){
10   i = 0;
11   return this;
14 int S::i = 1;
15 int main(void)
17         S * s = new S;
18         int k=(s->foo())->i;
19         return k;