This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Is it a bug of gcc
- From: "dong jin" <zdjchina at hotmail dot com>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 03 Jan 2004 15:39:05 +0900
- Subject: Is it a bug of gcc
- Bcc:
Dear Sir:
Happy new to you.
when I used gcc to compile my a very small program, which had been put a
bug by me for a test.
when I finished compiling, and run it, It run well without any problem. but
in fact it has very clear logical error. why? I really appreciate your
sharing this information.
I hope to get message "Segmentation fault", but nothing happened.
the follow is the little program.
********************************
#include <stdio.h>
int foo(int n){
return 3*n;
}
int main (void){
int i, *p;
int tmp[5]; /*contain five int*/
p= tmp;
for (i = 0; i<10; i++){
*p++ = foo(i);
}
return 0;
}
the CPU is: Pentium III, the version of gcc is GCC-3.3.2
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus