Sun386i, cc and calctool

francis%catuc.UUCP at arizona.edu francis%catuc.UUCP at arizona.edu
Sun Feb 19 12:07:41 AEST 1989


This is the third time I have submitted this article to sun-spots: the
requests must be getting lost!

[[ No, they were being sent to the wrong address!  If you want to mail a
submission to the digest, please send it to "sun-spots at rice.edu".  Thank
you.  --wnl ]]

In a followup to the article I posted trying to find out why I couldn't
compile the cacltool program written by Chuck Musciano on my 386i,  I
narrowed the problem to the C Compiler.  For those of you interested, try
to compile the code fragment (isolated by Peter Collins):

   main()
   {
	   int     i;
	    double v_stack[100];
	    int    v_top;

	    i = ~ (unsigned int) v_stack[v_top];
   }

cc never returns on my machine.  The work around that I found was to do
the following:

   main()
   {
	   int    i;
	   double v_stack[100], vs;
	   int    v_top;

	   vs = v_stack[v_top];
	   i =  ~ (unsigned int) vs;
   }

Anyway, there are about 20 lines like the assignement statement in the bad
example above in the file 'ops.c' in the calctool shar.  Just apply the
technique shown above to each case.

Francis Sullivan
Computer Automation, Tucson, AZ
...!hao!noao!arizona!catuc!francis
catuc!francis at arizona.edu



More information about the Comp.sys.sun mailing list