repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
FSF GCC merge 02/23/03
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.martin
/
eval1.C
blob
ad7f2e478c4cf6c7bf87dc5ba58a9e237b22c1e6
1
// Postfix expression must be evaluated even if accessing a static member.
2
3
struct S
4
{
5
static int i;
6
S* foo();
7
};
8
9
S* S::foo(){
10
i = 0;
11
return this;
12
}
13
14
int S::i = 1;
15
int main(void)
16
{
17
S * s = new S;
18
int k=(s->foo())->i;
19
return k;
20
}