![]() |
|< 1 2 3 4 5 >| | ![]() |
48 Einträge, 5 Seiten |
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
27
28
29
$ cat >test.c
#include <stdio.h>
int main(void) {
int i = 0;
i = i++;
printf("%d\n", i);
return 0;
}
$ gcc-3.3 -Wall -O0 -g1 -o test test.c
test.c: In function `main':
test.c:5: warning: operation on `i' may be undefined
$ ./test
1
$ gcc-4.0 -Wall -O0 -g1 -o test test.c
test.c: In function 'main':
test.c:5: warning: operation on 'i' may be undefined
$ ./test
1
$ gcc-3.3 -Wall -O3 -g0 -o test test.c
test.c: In function `main':
test.c:5: warning: operation on `i' may be undefined
$ ./test
1
$ gcc-4.0 -Wall -O3 -g0 -o test test.c
test.c: In function 'main':
test.c:5: warning: operation on 'i' may be undefined
$ ./test
1
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
27
28
29
$ cat >test.c
#include <stdio.h>
int main(void) {
int i = 0;
i = i++;
printf("%d\n", i);
return 0;
}
$ gcc-3.3 -Wall -O0 -g1 -o test test.c
test.c: In function `main':
test.c:5: warning: operation on `i' may be undefined
$ ./test
1
$ gcc-4.0 -Wall -O0 -g1 -o test test.c
test.c: In function 'main':
test.c:5: warning: operation on 'i' may be undefined
$ ./test
1
$ gcc-3.3 -Wall -O3 -g0 -o test test.c
test.c: In function `main':
test.c:5: warning: operation on `i' may be undefined
$ ./test
1
$ gcc-4.0 -Wall -O3 -g0 -o test test.c
test.c: In function 'main':
test.c:5: warning: operation on 'i' may be undefined
$ ./test
1
![]() |
|< 1 2 3 4 5 >| | ![]() |
48 Einträge, 5 Seiten |