public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Is it a bug of gcc
@ 2004-01-03  6:39 dong jin
  2004-01-06 19:23 ` Jim Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: dong jin @ 2004-01-03  6:39 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-01-06 19:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-03  6:39 Is it a bug of gcc dong jin
2004-01-06 19:23 ` Jim Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).