C compiler bug

ravi at flairvax.UUCP ravi at flairvax.UUCP
Wed Jun 15 09:51:28 AEST 1983




   A very simple program 


	#include <stdio.h>
	
	main ()
	{

          char *c[],*d[];

	  *c = "i am a string";
	  *d = "so what";

	  printf("%s\n",*c);
	  printf("%s\n",*d);

	}


   on 4.1bsd  produced

        
	so what
	so what


   whereas the C compiler on the TOPS-20 and other variations of the above
   program on 4.1 bsd produced the correct result.

   I am curious to find out WHY?.



   ravi
   Fairchild Research,
   Palo Alto,CA.



More information about the Comp.lang.c mailing list