diff --git a/util/ncgg/cgg.y b/util/ncgg/cgg.y index c648d276c..0c0e16514 100644 --- a/util/ncgg/cgg.y +++ b/util/ncgg/cgg.y @@ -607,7 +607,7 @@ coercdeflist_el {startline = lineno; tokpatlen=0; inithall();} STACK allocates generates YIELDS tokeninstance { checkhall(); - n_coerc(0,0,$4,$5,(struct varinfo *) 0,$7); + n_coerc(0,0,$4,$5,NULL,&$7); freevi($4); freevi($5); } @@ -623,7 +623,7 @@ coercdeflist_el optexpr allocates generates yields { tokpatro[0] = 0; checkhall(); - n_coerc($3,$5,$6,$7,$8); + n_coerc($3,$5,$6,$7,$8,NULL); freevi($6); freevi($7); cursetno = -1; diff --git a/util/ncgg/coerc.c b/util/ncgg/coerc.c index 23b711b22..50265c59e 100644 --- a/util/ncgg/coerc.c +++ b/util/ncgg/coerc.c @@ -208,7 +208,7 @@ set_t unstackset; /*VARARGS5*/ -void n_coerc(int ti, int be, struct varinfo *al, struct varinfo *ge, struct varinfo *rp, iocc_t in) +void n_coerc(int ti, int be, struct varinfo *al, struct varinfo *ge, struct varinfo *rp, iocc_p inp) { register c3_p c3p; register int i; @@ -236,7 +236,7 @@ void n_coerc(int ti, int be, struct varinfo *al, struct varinfo *ge, struct vari { NEW(rp, struct varinfo); rp->vi_next = 0; - rp->vi_int[0] = in.in_index; + rp->vi_int[0] = inp->in_index; } if (nallreg > 1) error("More than 1 register may not be allocated"); @@ -250,7 +250,7 @@ void n_coerc(int ti, int be, struct varinfo *al, struct varinfo *ge, struct vari dopattern(ti == 0, VI_NULL, al, ge, rp, VI_NULL); if (ti == 0) for (i = 0; i < SETSIZE; i++) - unstackset.set_val[i] |= in.in_set[i]; + unstackset.set_val[i] |= inp->in_set[i]; freevi(rp); } diff --git a/util/ncgg/coerc.h b/util/ncgg/coerc.h index b34338e2f..e45c75754 100644 --- a/util/ncgg/coerc.h +++ b/util/ncgg/coerc.h @@ -23,8 +23,7 @@ struct varinfo *gen_preturn(void); struct varinfo *gen_tlab(int n); void n_stack(int s, int e, int p, struct varinfo *vi); void checkstacking(register short *sp); -/* cgg.y is buggy!!! it has one less parameter.. */ -/*void n_coerc(int ti, int be, struct varinfo *al, struct varinfo *ge, struct varinfo *rp, iocc_t in);*/ +void n_coerc(int ti, int be, struct varinfo *al, struct varinfo *ge, struct varinfo *rp, iocc_p inp); void checkunstacking(int setno); #endif /* COERC_H_ */