more on PCC ICON type bug

Doug Gwyn <gwyn> gwyn at brl-tgr.ARPA
Wed Mar 20 15:06:49 AEST 1985


Oops, the bug fix I posted for the ICON size problem in the System V PCC
was too drastic:  In local2.c, in the acon() routine, the printf should
only shrink the tn.lval when it is indeed an ICON!  The bug fix should
read:

/*	@(#)local2.c	1.5	*/
...
acon( p ) register NODE *p; { /* print out a constant */
	extern CONSZ	shrink();	/* DAG -- added for assembler glitch fix */

	if( p->in.name[0] == '\0' ){
		/* DAG -- keep assembler happy with size of integer constants */
		printf( CONFMT, p->in.op==ICON ? shrink( p ) : p->tn.lval );
		}
...

I wish whoever wrote the compiler (Steve?) had inserted more comments
explaining what in the world is going on inside it.  It is no fun trying
to fix bugs like this..



More information about the Net.bugs.usg mailing list