Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

pcc bug

105 views
Skip to first unread message

Dave W. Smith

unread,
Aug 23, 1985, 7:37:02 PM8/23/85
to
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

0 new messages