Comparison failure in C compiler

Doug Gwyn <gwyn> gwyn at brl-tgr.ARPA
Fri Nov 30 10:06:35 AEST 1984


> The following program (sadly) prints the message
> 
> main()
> {
> 	int n, i;
> 	float x[2];
> 
> 	x[0] = 1.;
> 	n = 10000;
> 	i = 0;
> 	if(x[i] > n)
> 		printf("finds %g  is > %d\n",x[i],n);
> }

Why not use the current release of PCC instead?  That is what I do;
I quickly got tired of bugs like this in the one shipped with 4BSD.



More information about the Comp.unix.wizards mailing list