be1662dd15
Fixes https://github.com/davidgiven/ack/issues/188 One call to n_coerc() omits the 6th and last argument. This worked in traditional K&R C, but stops working if we declare n_coerc() with a prototype of all 6 parameters. Change the last parameter to a pointer. Declare n_coerc() with prototype, so it now requires all 6 arguments. Pass NULL when have no iocc_t. This NULL exists only to satisfy the prototype; n_coerc() will not use this NULL. A different fix would declare n_coerc() with 5 parameters and `...`, then use <stdarg.h> to read the 6th argument when it exists.
30 lines
832 B
C
30 lines
832 B
C
/* Copyright (c) 2019 ACK Project.
|
|
* See the copyright notice in the ACK home directory,
|
|
* in the file "Copyright".
|
|
*
|
|
* Created on: 2019-05-03
|
|
*
|
|
*/
|
|
#ifndef COERC_H_
|
|
#define COERC_H_
|
|
|
|
#include "iocc.h"
|
|
|
|
struct varinfo;
|
|
|
|
|
|
void n_move(int s1, int e1, int s2, int e2, struct varinfo *vi);
|
|
int existalmove(iocc_t from, int prpno);
|
|
struct varinfo *gen_move(iocc_t from, iocc_t to);
|
|
void n_test(int s, int e, struct varinfo *vi);
|
|
struct varinfo *gen_test(iocc_t from);
|
|
struct varinfo *gen_label(int arg);
|
|
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);
|
|
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_ */
|