Re: Bug in GCC?

Felix A. Koop (koop@erm1.u-strasbg.fr)
Wed, 26 Jul 1995 09:28:40 +0100


On Tue, 25 Jul 1995, Douglas Warren wrote:

> I believe I have found a serious bug in either GCC or the kernel,
> I am unable to trace it further then this, consider two files:
> test.c:
> main() {
> int i;
> double test,ANGLE;
> srandom(getpid());
> for(i=0;i<100;i++) {
> test=.5+double_rand();
> printf("%d %f\n",i,test);
> }
> }
[...]

You need to declare the function double_rand() in the first file.
Add a prototype and all will work well. At least it does for me.

Greetings

Felix A. Koop (Felix.Koop@ensps.u-strasbg.fr)

Disclaimer: Any suggestions, comments, or ideas promulgated are absolutely
and positively disclaimed to be claimed for the purposes herein, whereas, and
therefore. Any resemblance to intelligent ideas are purely coincidental.