Portable C Compiler Bug
Chris Torek
chris at mimsy.UUCP
Sat Oct 8 04:57:40 AEST 1988
In article <2737 at uvacs.cs.Virginia.EDU> amh at uvacs.cs.Virginia.EDU
(Anne M. Holler) writes:
>...3. The bug causes the compiler to sometimes fail giving the error
>message "schain botch".
Yes. Anne's fix should work. The bug is already fixed in
4.3BSD-tahoe; here is the `official' fix. Your line numbers will
differ.
***************
*** 1854,1859 ****
/* step 1: remove entries */
while( chaintop-1 > lev ){
- register int type;
-
p = schain[--chaintop];
schain[chaintop] = 0;
--- 1890,1893 ----
***************
*** 1860,1864 ****
for( ; p; p = q ){
q = p->snext;
- type = p->stype;
if( p->stype == TNULL || p->slevel <= lev )
cerror( "schain botch" );
--- 1894,1897 ----
***************
*** 1894,1898 ****
p = clist;
while( p ){
! register struct symtab *r, *next;
q = p;
--- 1927,1931 ----
p = clist;
while( p ){
! register struct symtab *next, **t, *r;
q = p;
***************
*** 1902,1905 ****
--- 1935,1946 ----
if( q == p || q->stype == TNULL )break;
if( (r = relook(q)) != q ) {
+ /* move q in schain list */
+ t = &schain[q->slevel];
+ while( *t && *t != q )
+ t = &(*t)->snext;
+ if( *t )
+ *t = r;
+ else
+ cerror("schain botch 2");
*r = *q;
q->stype = TNULL;
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain: chris at mimsy.umd.edu Path: uunet!mimsy!chris
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list