[net.bugs.4bsd] pcc bug

dws@tolerant.UUCP (Dave W. Smith) (08/24/85)

Near the top of routine clocal (local.c), add:

	if ( p->tn.rval == NONAME )
	{
	    /* step over the landmine left for us by optim() when it
	       turned U*->ICON into NAME */
	    return (p);
	}

directly before p->tn.rval is used to index stab[]

This will protect against the compiler blowing itself to little pieces for
a few *very* obscure constructs involving numbers casted as structure
pointers.  E.g.

... ((struct foo *) 0x1234)->bar + ((struct foo *) 0x1234)->baz ...

You're not likely to run into this one unless you're hacking on kernel code
or putting stuff into ROMs.
-- 
  David W. Smith             {ucbvax}!tolerant!dws
  Tolerant Systems, Inc.
  408/946-5667