Compiler Bug

David B.Anderson davea at quasar.wpd.sgi.com
Tue May 14 04:33:42 AEST 1991


In article <9105092153.aa04182 at WOLF.BRL.MIL> sue at BRL.MIL (Susan Muuss, VLD/ASB) writes:
>Below is a sample program containing relevant lines of C code that
>caused ccom to dump core with a signal 138. Apparently, a missing semi-colon
>is the culprit.  However, the compiler should ordinarily catch that and

/* The code after simplification and preprocessing. */
typedef double point_t[3];
main()
{
	int		v_char_width;	float		v_tick_hgt;	
	float		v_x_offset;	float		v_y_offset;	
	point_t		v_offset;

	v_y_offset = -(2 * v_tick_hgt + v_char_width) /* MISSING SEMICOLON */

	    (v_offset)[X] = ( v_x_offset);	
}

Susan Muuss' analysis is exactly right.  

I have a fix and will put into release 4.0 today; the result is:

	./ccom: Error: , line 11: illegal function
                    (v_offset)[X] = ( v_x_offset);
         --------------------^

which is only a hint that *something* is wrong (sigh).


Thanks for bringing the bug to our attention.

[ David B. Anderson  Silicon Graphics                 davea at sgi.com ]
[``What could possibly go wrong?''                      --Calvin
 `` Whenever you ask that, my tail gets all bushy.''    --Hobbes    ] 



More information about the Comp.sys.sgi mailing list