Commit d6b9cbe1 authored by Michael Beck's avatar Michael Beck
Browse files

Fixed prototypes to compile with -Wstrict-prototypes.

[r785]
parent f7102255
...@@ -46,7 +46,7 @@ typedef struct scc_info { ...@@ -46,7 +46,7 @@ typedef struct scc_info {
*/ */
} scc_info; } scc_info;
static INLINE scc_info* new_scc_info() { static INLINE scc_info* new_scc_info(void) {
scc_info *info = obstack_alloc (outermost_ir_graph->obst, sizeof (scc_info)); scc_info *info = obstack_alloc (outermost_ir_graph->obst, sizeof (scc_info));
memset (info, 0, sizeof (scc_info)); memset (info, 0, sizeof (scc_info));
return info; return info;
...@@ -144,7 +144,7 @@ ir_loop * get_irn_loop(ir_node *n) { ...@@ -144,7 +144,7 @@ ir_loop * get_irn_loop(ir_node *n) {
static ir_node **stack = NULL; static ir_node **stack = NULL;
static int tos = 0; /* top of stack */ static int tos = 0; /* top of stack */
static INLINE void init_stack() { static INLINE void init_stack(void) {
if (stack) { if (stack) {
ARR_RESIZE (ir_node *, stack, 1000); ARR_RESIZE (ir_node *, stack, 1000);
} else { } else {
...@@ -154,7 +154,7 @@ static INLINE void init_stack() { ...@@ -154,7 +154,7 @@ static INLINE void init_stack() {
} }
#if 0 #if 0
static INLINE void free_stack() { static INLINE void free_stack(void) {
DEL_ARR_F(stack); DEL_ARR_F(stack);
stack = NULL; stack = NULL;
tos = 0; tos = 0;
...@@ -355,7 +355,7 @@ init_scc (ir_graph *irg) { ...@@ -355,7 +355,7 @@ init_scc (ir_graph *irg) {
} }
static INLINE void static INLINE void
init_ip_scc () { init_ip_scc (void) {
current_dfn = 1; current_dfn = 1;
loop_node_cnt = 0; loop_node_cnt = 0;
init_stack(); init_stack();
...@@ -365,7 +365,7 @@ init_ip_scc () { ...@@ -365,7 +365,7 @@ init_ip_scc () {
#if 0 #if 0
Works, but is inefficient. Works, but is inefficient.
static INLINE void static INLINE void
init_ip_scc () { init_ip_scc (void) {
int i; int i;
interprocedural_view = 1; interprocedural_view = 1;
current_dfn = 1; current_dfn = 1;
...@@ -721,7 +721,7 @@ void construct_backedges(ir_graph *irg) { ...@@ -721,7 +721,7 @@ void construct_backedges(ir_graph *irg) {
void construct_ip_backedges () { void construct_ip_backedges (void) {
ir_graph *rem = current_ir_graph; ir_graph *rem = current_ir_graph;
int rem_ipv = interprocedural_view; int rem_ipv = interprocedural_view;
int i, j; int i, j;
......
...@@ -1155,8 +1155,8 @@ ir_node *new_rd_Tuple (dbg_info *db, ir_graph *irg, ir_node *block, ...@@ -1155,8 +1155,8 @@ ir_node *new_rd_Tuple (dbg_info *db, ir_graph *irg, ir_node *block,
int arity, ir_node *in[]); int arity, ir_node *in[]);
ir_node *new_rd_Id (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *new_rd_Id (dbg_info *db, ir_graph *irg, ir_node *block,
ir_node *val, ir_mode *mode); ir_node *val, ir_mode *mode);
ir_node *new_rd_Bad (); ir_node *new_rd_Bad (void);
ir_node *new_rd_Unknown(); ir_node *new_rd_Unknown(void);
ir_node *new_rd_CallBegin(dbg_info *db, ir_graph *irg, ir_node *block, ir_node *callee); ir_node *new_rd_CallBegin(dbg_info *db, ir_graph *irg, ir_node *block, ir_node *callee);
ir_node *new_rd_EndReg (dbg_info *db, ir_graph *irg, ir_node *block); ir_node *new_rd_EndReg (dbg_info *db, ir_graph *irg, ir_node *block);
ir_node *new_rd_EndExcept(dbg_info *db, ir_graph *irg, ir_node *block); ir_node *new_rd_EndExcept(dbg_info *db, ir_graph *irg, ir_node *block);
...@@ -1247,8 +1247,8 @@ ir_node *new_r_Tuple (ir_graph *irg, ir_node *block, ...@@ -1247,8 +1247,8 @@ ir_node *new_r_Tuple (ir_graph *irg, ir_node *block,
int arity, ir_node *in[]); int arity, ir_node *in[]);
ir_node *new_r_Id (ir_graph *irg, ir_node *block, ir_node *new_r_Id (ir_graph *irg, ir_node *block,
ir_node *val, ir_mode *mode); ir_node *val, ir_mode *mode);
ir_node *new_r_Bad (); ir_node *new_r_Bad (void);
ir_node *new_r_Unknown(); ir_node *new_r_Unknown(void);
ir_node *new_r_CallBegin(ir_graph *irg, ir_node *block, ir_node *callee); ir_node *new_r_CallBegin(ir_graph *irg, ir_node *block, ir_node *callee);
ir_node *new_r_EndReg (ir_graph *irg, ir_node *block); ir_node *new_r_EndReg (ir_graph *irg, ir_node *block);
ir_node *new_r_EndExcept(ir_graph *irg, ir_node *block); ir_node *new_r_EndExcept(ir_graph *irg, ir_node *block);
...@@ -1430,10 +1430,10 @@ void keep_alive (ir_node *ka); ...@@ -1430,10 +1430,10 @@ void keep_alive (ir_node *ka);
/* --- Useful access routines --- */ /* --- Useful access routines --- */
/** Returns the current block of the current graph. To set the current /** Returns the current block of the current graph. To set the current
block use switch_block(). */ block use switch_block(). */
ir_node *get_cur_block(); ir_node *get_cur_block(void);
/** Returns the frame type of the current graph */ /** Returns the frame type of the current graph */
type *get_cur_frame_type(); type *get_cur_frame_type(void);
/* --- initialize and finalize ir construction --- */ /* --- initialize and finalize ir construction --- */
......
...@@ -253,7 +253,7 @@ copy_preds (ir_node *n, void *env) { ...@@ -253,7 +253,7 @@ copy_preds (ir_node *n, void *env) {
/* Copies the graph recursively, compacts the keepalive of the end node. */ /* Copies the graph recursively, compacts the keepalive of the end node. */
static void static void
copy_graph () { copy_graph (void) {
ir_node *oe, *ne; /* old end, new end */ ir_node *oe, *ne; /* old end, new end */
ir_node *ka; /* keep alive */ ir_node *ka; /* keep alive */
int i; int i;
...@@ -309,7 +309,7 @@ copy_graph () { ...@@ -309,7 +309,7 @@ copy_graph () {
Then fixes the fields in current_ir_graph containing nodes of the Then fixes the fields in current_ir_graph containing nodes of the
graph. */ graph. */
static void static void
copy_graph_env () { copy_graph_env (void) {
ir_node *old_end; ir_node *old_end;
/* Not all nodes remembered in current_ir_graph might be reachable /* Not all nodes remembered in current_ir_graph might be reachable
from the end node. Assure their link is set to NULL, so that from the end node. Assure their link is set to NULL, so that
...@@ -941,7 +941,7 @@ place_floats_early (ir_node *n) ...@@ -941,7 +941,7 @@ place_floats_early (ir_node *n)
Start, Call and end at pinned nodes as Store, Call. Place_early Start, Call and end at pinned nodes as Store, Call. Place_early
places all floating nodes reachable from its argument through floating places all floating nodes reachable from its argument through floating
nodes and adds all beginnings at pinned nodes to the worklist. */ nodes and adds all beginnings at pinned nodes to the worklist. */
static INLINE void place_early () { static INLINE void place_early (void) {
assert(worklist); assert(worklist);
inc_irg_visited(current_ir_graph); inc_irg_visited(current_ir_graph);
...@@ -1095,7 +1095,7 @@ place_floats_late (ir_node *n) ...@@ -1095,7 +1095,7 @@ place_floats_late (ir_node *n)
} }
} }
static INLINE void place_late() { static INLINE void place_late(void) {
assert(worklist); assert(worklist);
inc_irg_visited(current_ir_graph); inc_irg_visited(current_ir_graph);
......
...@@ -72,13 +72,13 @@ typedef struct ir_graph ir_graph; ...@@ -72,13 +72,13 @@ typedef struct ir_graph ir_graph;
is used by the ir construction interface in ircons and by the is used by the ir construction interface in ircons and by the
optimizations. */ optimizations. */
extern ir_graph *current_ir_graph; extern ir_graph *current_ir_graph;
ir_graph *get_current_ir_graph(); ir_graph *get_current_ir_graph(void);
void set_current_ir_graph(ir_graph *graph); void set_current_ir_graph(ir_graph *graph);
/** This flag indicate the current view. The behaviour of some methods /** This flag indicate the current view. The behaviour of some methods
* (get_irn_*, set_irn_*) is influenced by this flag. */ * (get_irn_*, set_irn_*) is influenced by this flag. */
extern bool interprocedural_view; extern bool interprocedural_view;
bool get_interprocedural_view(); bool get_interprocedural_view(void);
void set_interprocedural_view(bool state); void set_interprocedural_view(bool state);
/** Create a new ir graph to built ir for a procedure. /** Create a new ir graph to built ir for a procedure.
......
...@@ -76,7 +76,7 @@ struct ir_graph { ...@@ -76,7 +76,7 @@ struct ir_graph {
/** Make a rudimentary ir graph for the constant code. /** Make a rudimentary ir graph for the constant code.
Must look like a correct irg, spare everything else. */ Must look like a correct irg, spare everything else. */
ir_graph *new_const_code_irg(); ir_graph *new_const_code_irg(void);
INLINE void INLINE void
set_irg_pinned (ir_graph *irg, op_pinned p); set_irg_pinned (ir_graph *irg, op_pinned p);
......
...@@ -85,25 +85,25 @@ extern ir_mode *mode_BB; /**< block */ ...@@ -85,25 +85,25 @@ extern ir_mode *mode_BB; /**< block */
/*@{*/ /*@{*/
/** Access routines for JNI Interface */ /** Access routines for JNI Interface */
ir_mode *get_modeT(); ir_mode *get_modeT(void);
ir_mode *get_modeF(); ir_mode *get_modeF(void);
ir_mode *get_modeD(); ir_mode *get_modeD(void);
ir_mode *get_modeE(); ir_mode *get_modeE(void);
ir_mode *get_modeBs(); ir_mode *get_modeBs(void);
ir_mode *get_modeBu(); ir_mode *get_modeBu(void);
ir_mode *get_modeHs(); ir_mode *get_modeHs(void);
ir_mode *get_modeHu(); ir_mode *get_modeHu(void);
ir_mode *get_modeIs(); ir_mode *get_modeIs(void);
ir_mode *get_modeIu(); ir_mode *get_modeIu(void);
ir_mode *get_modeLs(); ir_mode *get_modeLs(void);
ir_mode *get_modeLu(); ir_mode *get_modeLu(void);
ir_mode *get_modeC(); ir_mode *get_modeC(void);
ir_mode *get_modeU(); ir_mode *get_modeU(void);
ir_mode *get_modeP(); ir_mode *get_modeP(void);
ir_mode *get_modeb(); ir_mode *get_modeb(void);
ir_mode *get_modeX(); ir_mode *get_modeX(void);
ir_mode *get_modeM(); ir_mode *get_modeM(void);
ir_mode *get_modeBB(); ir_mode *get_modeBB(void);
/*@}*/ /*@}*/
/** An enum for this mode */ /** An enum for this mode */
......
...@@ -39,61 +39,61 @@ typedef enum { ...@@ -39,61 +39,61 @@ typedef enum {
typedef struct ir_op ir_op; typedef struct ir_op ir_op;
extern ir_op *op_Block; ir_op *get_op_Block (); extern ir_op *op_Block; ir_op *get_op_Block (void);
extern ir_op *op_Start; ir_op *get_op_Start (); extern ir_op *op_Start; ir_op *get_op_Start (void);
extern ir_op *op_End; ir_op *get_op_End (); extern ir_op *op_End; ir_op *get_op_End (void);
extern ir_op *op_Jmp; ir_op *get_op_Jmp (); extern ir_op *op_Jmp; ir_op *get_op_Jmp (void);
extern ir_op *op_Cond; ir_op *get_op_Cond (); extern ir_op *op_Cond; ir_op *get_op_Cond (void);
extern ir_op *op_Return; ir_op *get_op_Return (); extern ir_op *op_Return; ir_op *get_op_Return (void);
extern ir_op *op_Raise; ir_op *get_op_Raise (); extern ir_op *op_Raise; ir_op *get_op_Raise (void);
extern ir_op *op_Sel; ir_op *get_op_Sel (); extern ir_op *op_Sel; ir_op *get_op_Sel (void);
extern ir_op *op_InstOf; ir_op *get_op_InstOf (); extern ir_op *op_InstOf; ir_op *get_op_InstOf (void);
extern ir_op *op_Const; ir_op *get_op_Const (); extern ir_op *op_Const; ir_op *get_op_Const (void);
extern ir_op *op_SymConst; ir_op *get_op_SymConst (); extern ir_op *op_SymConst; ir_op *get_op_SymConst (void);
extern ir_op *op_Call; ir_op *get_op_Call (); extern ir_op *op_Call; ir_op *get_op_Call (void);
extern ir_op *op_Add; ir_op *get_op_Add (); extern ir_op *op_Add; ir_op *get_op_Add (void);
extern ir_op *op_Sub; ir_op *get_op_Sub (); extern ir_op *op_Sub; ir_op *get_op_Sub (void);
extern ir_op *op_Minus; ir_op *get_op_Minus (); extern ir_op *op_Minus; ir_op *get_op_Minus (void);
extern ir_op *op_Mul; ir_op *get_op_Mul (); extern ir_op *op_Mul; ir_op *get_op_Mul (void);
extern ir_op *op_Quot; ir_op *get_op_Quot (); extern ir_op *op_Quot; ir_op *get_op_Quot (void);
extern ir_op *op_DivMod; ir_op *get_op_DivMod (); extern ir_op *op_DivMod; ir_op *get_op_DivMod (void);
extern ir_op *op_Div; ir_op *get_op_Div (); extern ir_op *op_Div; ir_op *get_op_Div (void);
extern ir_op *op_Mod; ir_op *get_op_Mod (); extern ir_op *op_Mod; ir_op *get_op_Mod (void);
extern ir_op *op_Abs; ir_op *get_op_Abs (); extern ir_op *op_Abs; ir_op *get_op_Abs (void);
extern ir_op *op_And; ir_op *get_op_And (); extern ir_op *op_And; ir_op *get_op_And (void);
extern ir_op *op_Or; ir_op *get_op_Or (); extern ir_op *op_Or; ir_op *get_op_Or (void);
extern ir_op *op_Eor; ir_op *get_op_Eor (); extern ir_op *op_Eor; ir_op *get_op_Eor (void);
extern ir_op *op_Not; ir_op *get_op_Not (); extern ir_op *op_Not; ir_op *get_op_Not (void);
extern ir_op *op_Cmp; ir_op *get_op_Cmp (); extern ir_op *op_Cmp; ir_op *get_op_Cmp (void);
extern ir_op *op_Shl; ir_op *get_op_Shl (); extern ir_op *op_Shl; ir_op *get_op_Shl (void);
extern ir_op *op_Shr; ir_op *get_op_Shr (); extern ir_op *op_Shr; ir_op *get_op_Shr (void);
extern ir_op *op_Shrs; ir_op *get_op_Shrs (); extern ir_op *op_Shrs; ir_op *get_op_Shrs (void);
extern ir_op *op_Rot; ir_op *get_op_Rot (); extern ir_op *op_Rot; ir_op *get_op_Rot (void);
extern ir_op *op_Conv; ir_op *get_op_Conv (); extern ir_op *op_Conv; ir_op *get_op_Conv (void);
extern ir_op *op_Phi; ir_op *get_op_Phi (); extern ir_op *op_Phi; ir_op *get_op_Phi (void);
extern ir_op *op_Load; ir_op *get_op_Load (); extern ir_op *op_Load; ir_op *get_op_Load (void);
extern ir_op *op_Store; ir_op *get_op_Store (); extern ir_op *op_Store; ir_op *get_op_Store (void);
extern ir_op *op_Alloc; ir_op *get_op_Alloc (); extern ir_op *op_Alloc; ir_op *get_op_Alloc (void);
extern ir_op *op_Free; ir_op *get_op_Free (); extern ir_op *op_Free; ir_op *get_op_Free (void);
extern ir_op *op_Sync; ir_op *get_op_Sync (); extern ir_op *op_Sync; ir_op *get_op_Sync (void);
extern ir_op *op_Tuple; ir_op *get_op_Tuple (); extern ir_op *op_Tuple; ir_op *get_op_Tuple (void);
extern ir_op *op_Proj; ir_op *get_op_Proj (); extern ir_op *op_Proj; ir_op *get_op_Proj (void);
extern ir_op *op_Id; ir_op *get_op_Id (); extern ir_op *op_Id; ir_op *get_op_Id (void);
extern ir_op *op_Bad; ir_op *get_op_Bad (); extern ir_op *op_Bad; ir_op *get_op_Bad (void);
extern ir_op *op_Unknown; ir_op *get_op_Unknown (); extern ir_op *op_Unknown; ir_op *get_op_Unknown (void);
extern ir_op *op_Filter; ir_op *get_op_Filter (); extern ir_op *op_Filter; ir_op *get_op_Filter (void);
extern ir_op *op_Break; ir_op *get_op_Break (); extern ir_op *op_Break; ir_op *get_op_Break (void);
extern ir_op *op_CallBegin; ir_op *get_op_CallBegin (); extern ir_op *op_CallBegin; ir_op *get_op_CallBegin (void);
extern ir_op *op_EndReg; ir_op *get_op_EndReg (); extern ir_op *op_EndReg; ir_op *get_op_EndReg (void);
extern ir_op *op_EndExcept; ir_op *get_op_EndExcept (); extern ir_op *op_EndExcept; ir_op *get_op_EndExcept (void);
/** Returns the ident for the opcode name */ /** Returns the ident for the opcode name */
......
...@@ -62,7 +62,7 @@ static void check_tore(type_or_ent *tore, void *env) { ...@@ -62,7 +62,7 @@ static void check_tore(type_or_ent *tore, void *env) {
} }
int tr_vrfy() { int tr_vrfy(void) {
int res; int res;
type_walk(check_tore, NULL, &res); type_walk(check_tore, NULL, &res);
......
...@@ -36,6 +36,6 @@ enum trvrfy_error_codes { ...@@ -36,6 +36,6 @@ enum trvrfy_error_codes {
* 0 if graph is correct * 0 if graph is correct
* else error code. * else error code.
*/ */
int tr_vrfy(); int tr_vrfy(void);
#endif /* TRVRFY_H */ #endif /* TRVRFY_H */
...@@ -170,8 +170,8 @@ void set_type_link(type *tp, void *l); ...@@ -170,8 +170,8 @@ void set_type_link(type *tp, void *l);
*/ */
extern unsigned long type_visited; extern unsigned long type_visited;
void set_master_type_visited(unsigned long val); void set_master_type_visited(unsigned long val);
unsigned long get_master_type_visited(); unsigned long get_master_type_visited(void);
void inc_master_type_visited(); void inc_master_type_visited(void);
/** /**
* *
......
...@@ -98,13 +98,13 @@ struct tarval { ...@@ -98,13 +98,13 @@ struct tarval {
}; };
extern tarval *tarval_bad; tarval *get_tarval_bad(); extern tarval *tarval_bad; tarval *get_tarval_bad(void);
/* We should have a tarval_undefined */ /* We should have a tarval_undefined */
extern tarval *tarval_b_false; tarval *get_tarval_b_false (); extern tarval *tarval_b_false; tarval *get_tarval_b_false (void);
extern tarval *tarval_b_true; tarval *get_tarval_b_true (); extern tarval *tarval_b_true; tarval *get_tarval_b_true (void);
extern tarval *tarval_D_NaN; tarval *get_tarval_D_NaN (); extern tarval *tarval_D_NaN; tarval *get_tarval_D_NaN (void);
extern tarval *tarval_D_Inf; tarval *get_tarval_D_Inf (); extern tarval *tarval_D_Inf; tarval *get_tarval_D_Inf (void);
extern tarval *tarval_P_void; tarval *get_tarval_P_void (); extern tarval *tarval_P_void; tarval *get_tarval_P_void (void);
extern tarval *tarval_mode_null[]; tarval *get_tarval_mode_null(ir_mode *mode); extern tarval *tarval_mode_null[]; tarval *get_tarval_mode_null(ir_mode *mode);
/*@{*/ /*@{*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment