17bc9cdef7
Most warnings are for functions implicitly returning int. Change most
of these functions to return void. (Traditional K&R C had no void
type, but C89 has it.)
Add prototypes to most function declarations in headers. This is
easy, because ego declares most of its extern functions, and the
comments listed most parameters. There were a few outdated or missing
declarations, and a few .c files that failed to include an .h with the
declarations.
Add prototypes to a few function definitions in .c files. Most
functions still have traditional K&R definitions. Most STATIC
functions still don't have prototypes, because they have no earlier
declaration where I would have added the prototype.
Change some prototypes in util/ego/share/alloc.h. Functions newmap()
and oldmap() handle an array of pointers to something; change the
array's type from `short **` to `void **`. Callers use casts to go
between `void **` and the correct type, like `line_p *`. Function
oldtable() takes a `short *`, not a `short **`; I added the wrong type
in 5bbbaf4
.
Make a few other changes to silence warnings. There are a few places
where clang wants extra parentheses in the code.
Edit util/ego/ra/build.lua to add the missing dependency on ra*.h; I
needed this to prevent crashes from ra.
46 lines
1.2 KiB
C
46 lines
1.2 KiB
C
/* $Id$ */
|
|
/*
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
*/
|
|
/* I N L I N E S U B S T I T U T I O N
|
|
*
|
|
* I L 1 _ A U X . H
|
|
*/
|
|
|
|
bool same_size(int t1, int t2); /*
|
|
* See if the two types t1 and t2 have
|
|
* the same size.
|
|
*/
|
|
void rem_actuals(actual_p acts);/*
|
|
* remove an actual-list from core.
|
|
*/
|
|
void remov_formals(proc_p p); /*
|
|
* Remove the formals-list of p from core.
|
|
*/
|
|
void rem_indir_acc(proc_p p); /*
|
|
* Remove formal that may be accessed
|
|
* indirectly from formal lists of p
|
|
*/
|
|
bool par_overlap(offset off1, int t1, offset off2, int t2);
|
|
/*
|
|
* See if the formal at offset off1 and type t1
|
|
* overlaps the formal at offset off2
|
|
* and type t2.
|
|
*/
|
|
short looplevel(bblock_p b); /*
|
|
* Determine the loop nesting level of b.
|
|
*/
|
|
int proclength(proc_p p); /*
|
|
* Determine the number of EM instructions
|
|
* in p. Do not count pseudos.
|
|
*/
|
|
|
|
line_p copy_code(line_p l1, line_p l2);
|
|
/*
|
|
* copy the code between l1 and l2.
|
|
* Pseudos may not be contained in
|
|
* the list of instructions. If l1==l2
|
|
* the result is only one instruction.
|
|
*/
|