From d6b9cbe1e2cf35e970a2eedea4b2bd368e94b48b Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Mon, 17 Feb 2003 13:32:34 +0000 Subject: [PATCH] Fixed prototypes to compile with -Wstrict-prototypes. [r785] --- ir/ana/irscc.c | 12 ++--- ir/ir/ircons.h | 12 ++--- ir/ir/irgopt.c | 8 ++-- ir/ir/irgraph.h | 4 +- ir/ir/irgraph_t.h | 2 +- ir/ir/irmode.h | 38 ++++++++-------- ir/ir/irop.h | 110 +++++++++++++++++++++++----------------------- ir/tr/trvrfy.c | 2 +- ir/tr/trvrfy.h | 2 +- ir/tr/type.h | 4 +- ir/tv/tv.h | 12 ++--- 11 files changed, 103 insertions(+), 103 deletions(-) diff --git a/ir/ana/irscc.c b/ir/ana/irscc.c index 6d247ba22..c8a533aa4 100644 --- a/ir/ana/irscc.c +++ b/ir/ana/irscc.c @@ -46,7 +46,7 @@ typedef struct 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)); memset (info, 0, sizeof (scc_info)); return info; @@ -144,7 +144,7 @@ ir_loop * get_irn_loop(ir_node *n) { static ir_node **stack = NULL; static int tos = 0; /* top of stack */ -static INLINE void init_stack() { +static INLINE void init_stack(void) { if (stack) { ARR_RESIZE (ir_node *, stack, 1000); } else { @@ -154,7 +154,7 @@ static INLINE void init_stack() { } #if 0 -static INLINE void free_stack() { +static INLINE void free_stack(void) { DEL_ARR_F(stack); stack = NULL; tos = 0; @@ -355,7 +355,7 @@ init_scc (ir_graph *irg) { } static INLINE void -init_ip_scc () { +init_ip_scc (void) { current_dfn = 1; loop_node_cnt = 0; init_stack(); @@ -365,7 +365,7 @@ init_ip_scc () { #if 0 Works, but is inefficient. static INLINE void -init_ip_scc () { +init_ip_scc (void) { int i; interprocedural_view = 1; current_dfn = 1; @@ -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; int rem_ipv = interprocedural_view; int i, j; diff --git a/ir/ir/ircons.h b/ir/ir/ircons.h index 3c6b8dcd7..a4ec2d2bf 100644 --- a/ir/ir/ircons.h +++ b/ir/ir/ircons.h @@ -1155,8 +1155,8 @@ ir_node *new_rd_Tuple (dbg_info *db, ir_graph *irg, ir_node *block, int arity, ir_node *in[]); ir_node *new_rd_Id (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *val, ir_mode *mode); -ir_node *new_rd_Bad (); -ir_node *new_rd_Unknown(); +ir_node *new_rd_Bad (void); +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_EndReg (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, int arity, ir_node *in[]); ir_node *new_r_Id (ir_graph *irg, ir_node *block, ir_node *val, ir_mode *mode); -ir_node *new_r_Bad (); -ir_node *new_r_Unknown(); +ir_node *new_r_Bad (void); +ir_node *new_r_Unknown(void); 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_EndExcept(ir_graph *irg, ir_node *block); @@ -1430,10 +1430,10 @@ void keep_alive (ir_node *ka); /* --- Useful access routines --- */ /** Returns the current block of the current graph. To set the current block use switch_block(). */ -ir_node *get_cur_block(); +ir_node *get_cur_block(void); /** Returns the frame type of the current graph */ -type *get_cur_frame_type(); +type *get_cur_frame_type(void); /* --- initialize and finalize ir construction --- */ diff --git a/ir/ir/irgopt.c b/ir/ir/irgopt.c index 81c92a78e..0f20d7a6c 100644 --- a/ir/ir/irgopt.c +++ b/ir/ir/irgopt.c @@ -253,7 +253,7 @@ copy_preds (ir_node *n, void *env) { /* Copies the graph recursively, compacts the keepalive of the end node. */ static void -copy_graph () { +copy_graph (void) { ir_node *oe, *ne; /* old end, new end */ ir_node *ka; /* keep alive */ int i; @@ -309,7 +309,7 @@ copy_graph () { Then fixes the fields in current_ir_graph containing nodes of the graph. */ static void -copy_graph_env () { +copy_graph_env (void) { ir_node *old_end; /* Not all nodes remembered in current_ir_graph might be reachable from the end node. Assure their link is set to NULL, so that @@ -941,7 +941,7 @@ place_floats_early (ir_node *n) Start, Call and end at pinned nodes as Store, Call. Place_early places all floating nodes reachable from its argument through floating nodes and adds all beginnings at pinned nodes to the worklist. */ -static INLINE void place_early () { +static INLINE void place_early (void) { assert(worklist); inc_irg_visited(current_ir_graph); @@ -1095,7 +1095,7 @@ place_floats_late (ir_node *n) } } -static INLINE void place_late() { +static INLINE void place_late(void) { assert(worklist); inc_irg_visited(current_ir_graph); diff --git a/ir/ir/irgraph.h b/ir/ir/irgraph.h index 69c3c68bf..d5dfaff7e 100644 --- a/ir/ir/irgraph.h +++ b/ir/ir/irgraph.h @@ -72,13 +72,13 @@ typedef struct ir_graph ir_graph; is used by the ir construction interface in ircons and by the optimizations. */ 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); /** This flag indicate the current view. The behaviour of some methods * (get_irn_*, set_irn_*) is influenced by this flag. */ extern bool interprocedural_view; -bool get_interprocedural_view(); +bool get_interprocedural_view(void); void set_interprocedural_view(bool state); /** Create a new ir graph to built ir for a procedure. diff --git a/ir/ir/irgraph_t.h b/ir/ir/irgraph_t.h index 200831e3b..36bf52496 100644 --- a/ir/ir/irgraph_t.h +++ b/ir/ir/irgraph_t.h @@ -76,7 +76,7 @@ struct ir_graph { /** Make a rudimentary ir graph for the constant code. Must look like a correct irg, spare everything else. */ -ir_graph *new_const_code_irg(); +ir_graph *new_const_code_irg(void); INLINE void set_irg_pinned (ir_graph *irg, op_pinned p); diff --git a/ir/ir/irmode.h b/ir/ir/irmode.h index 158d382d1..3615d8688 100644 --- a/ir/ir/irmode.h +++ b/ir/ir/irmode.h @@ -85,25 +85,25 @@ extern ir_mode *mode_BB; /**< block */ /*@{*/ /** Access routines for JNI Interface */ -ir_mode *get_modeT(); -ir_mode *get_modeF(); -ir_mode *get_modeD(); -ir_mode *get_modeE(); -ir_mode *get_modeBs(); -ir_mode *get_modeBu(); -ir_mode *get_modeHs(); -ir_mode *get_modeHu(); -ir_mode *get_modeIs(); -ir_mode *get_modeIu(); -ir_mode *get_modeLs(); -ir_mode *get_modeLu(); -ir_mode *get_modeC(); -ir_mode *get_modeU(); -ir_mode *get_modeP(); -ir_mode *get_modeb(); -ir_mode *get_modeX(); -ir_mode *get_modeM(); -ir_mode *get_modeBB(); +ir_mode *get_modeT(void); +ir_mode *get_modeF(void); +ir_mode *get_modeD(void); +ir_mode *get_modeE(void); +ir_mode *get_modeBs(void); +ir_mode *get_modeBu(void); +ir_mode *get_modeHs(void); +ir_mode *get_modeHu(void); +ir_mode *get_modeIs(void); +ir_mode *get_modeIu(void); +ir_mode *get_modeLs(void); +ir_mode *get_modeLu(void); +ir_mode *get_modeC(void); +ir_mode *get_modeU(void); +ir_mode *get_modeP(void); +ir_mode *get_modeb(void); +ir_mode *get_modeX(void); +ir_mode *get_modeM(void); +ir_mode *get_modeBB(void); /*@}*/ /** An enum for this mode */ diff --git a/ir/ir/irop.h b/ir/ir/irop.h index bf6040c12..88f38e385 100644 --- a/ir/ir/irop.h +++ b/ir/ir/irop.h @@ -39,61 +39,61 @@ typedef enum { typedef struct ir_op ir_op; -extern ir_op *op_Block; ir_op *get_op_Block (); - -extern ir_op *op_Start; ir_op *get_op_Start (); -extern ir_op *op_End; ir_op *get_op_End (); -extern ir_op *op_Jmp; ir_op *get_op_Jmp (); -extern ir_op *op_Cond; ir_op *get_op_Cond (); -extern ir_op *op_Return; ir_op *get_op_Return (); -extern ir_op *op_Raise; ir_op *get_op_Raise (); -extern ir_op *op_Sel; ir_op *get_op_Sel (); -extern ir_op *op_InstOf; ir_op *get_op_InstOf (); - -extern ir_op *op_Const; ir_op *get_op_Const (); -extern ir_op *op_SymConst; ir_op *get_op_SymConst (); - -extern ir_op *op_Call; ir_op *get_op_Call (); -extern ir_op *op_Add; ir_op *get_op_Add (); -extern ir_op *op_Sub; ir_op *get_op_Sub (); -extern ir_op *op_Minus; ir_op *get_op_Minus (); -extern ir_op *op_Mul; ir_op *get_op_Mul (); -extern ir_op *op_Quot; ir_op *get_op_Quot (); -extern ir_op *op_DivMod; ir_op *get_op_DivMod (); -extern ir_op *op_Div; ir_op *get_op_Div (); -extern ir_op *op_Mod; ir_op *get_op_Mod (); -extern ir_op *op_Abs; ir_op *get_op_Abs (); -extern ir_op *op_And; ir_op *get_op_And (); -extern ir_op *op_Or; ir_op *get_op_Or (); -extern ir_op *op_Eor; ir_op *get_op_Eor (); -extern ir_op *op_Not; ir_op *get_op_Not (); -extern ir_op *op_Cmp; ir_op *get_op_Cmp (); -extern ir_op *op_Shl; ir_op *get_op_Shl (); -extern ir_op *op_Shr; ir_op *get_op_Shr (); -extern ir_op *op_Shrs; ir_op *get_op_Shrs (); -extern ir_op *op_Rot; ir_op *get_op_Rot (); -extern ir_op *op_Conv; ir_op *get_op_Conv (); - -extern ir_op *op_Phi; ir_op *get_op_Phi (); - -extern ir_op *op_Load; ir_op *get_op_Load (); -extern ir_op *op_Store; ir_op *get_op_Store (); -extern ir_op *op_Alloc; ir_op *get_op_Alloc (); -extern ir_op *op_Free; ir_op *get_op_Free (); - -extern ir_op *op_Sync; ir_op *get_op_Sync (); - -extern ir_op *op_Tuple; ir_op *get_op_Tuple (); -extern ir_op *op_Proj; ir_op *get_op_Proj (); -extern ir_op *op_Id; ir_op *get_op_Id (); -extern ir_op *op_Bad; ir_op *get_op_Bad (); - -extern ir_op *op_Unknown; ir_op *get_op_Unknown (); -extern ir_op *op_Filter; ir_op *get_op_Filter (); -extern ir_op *op_Break; ir_op *get_op_Break (); -extern ir_op *op_CallBegin; ir_op *get_op_CallBegin (); -extern ir_op *op_EndReg; ir_op *get_op_EndReg (); -extern ir_op *op_EndExcept; ir_op *get_op_EndExcept (); +extern ir_op *op_Block; ir_op *get_op_Block (void); + +extern ir_op *op_Start; ir_op *get_op_Start (void); +extern ir_op *op_End; ir_op *get_op_End (void); +extern ir_op *op_Jmp; ir_op *get_op_Jmp (void); +extern ir_op *op_Cond; ir_op *get_op_Cond (void); +extern ir_op *op_Return; ir_op *get_op_Return (void); +extern ir_op *op_Raise; ir_op *get_op_Raise (void); +extern ir_op *op_Sel; ir_op *get_op_Sel (void); +extern ir_op *op_InstOf; ir_op *get_op_InstOf (void); + +extern ir_op *op_Const; ir_op *get_op_Const (void); +extern ir_op *op_SymConst; ir_op *get_op_SymConst (void); + +extern ir_op *op_Call; ir_op *get_op_Call (void); +extern ir_op *op_Add; ir_op *get_op_Add (void); +extern ir_op *op_Sub; ir_op *get_op_Sub (void); +extern ir_op *op_Minus; ir_op *get_op_Minus (void); +extern ir_op *op_Mul; ir_op *get_op_Mul (void); +extern ir_op *op_Quot; ir_op *get_op_Quot (void); +extern ir_op *op_DivMod; ir_op *get_op_DivMod (void); +extern ir_op *op_Div; ir_op *get_op_Div (void); +extern ir_op *op_Mod; ir_op *get_op_Mod (void); +extern ir_op *op_Abs; ir_op *get_op_Abs (void); +extern ir_op *op_And; ir_op *get_op_And (void); +extern ir_op *op_Or; ir_op *get_op_Or (void); +extern ir_op *op_Eor; ir_op *get_op_Eor (void); +extern ir_op *op_Not; ir_op *get_op_Not (void); +extern ir_op *op_Cmp; ir_op *get_op_Cmp (void); +extern ir_op *op_Shl; ir_op *get_op_Shl (void); +extern ir_op *op_Shr; ir_op *get_op_Shr (void); +extern ir_op *op_Shrs; ir_op *get_op_Shrs (void); +extern ir_op *op_Rot; ir_op *get_op_Rot (void); +extern ir_op *op_Conv; ir_op *get_op_Conv (void); + +extern ir_op *op_Phi; ir_op *get_op_Phi (void); + +extern ir_op *op_Load; ir_op *get_op_Load (void); +extern ir_op *op_Store; ir_op *get_op_Store (void); +extern ir_op *op_Alloc; ir_op *get_op_Alloc (void); +extern ir_op *op_Free; ir_op *get_op_Free (void); + +extern ir_op *op_Sync; ir_op *get_op_Sync (void); + +extern ir_op *op_Tuple; ir_op *get_op_Tuple (void); +extern ir_op *op_Proj; ir_op *get_op_Proj (void); +extern ir_op *op_Id; ir_op *get_op_Id (void); +extern ir_op *op_Bad; ir_op *get_op_Bad (void); + +extern ir_op *op_Unknown; ir_op *get_op_Unknown (void); +extern ir_op *op_Filter; ir_op *get_op_Filter (void); +extern ir_op *op_Break; ir_op *get_op_Break (void); +extern ir_op *op_CallBegin; ir_op *get_op_CallBegin (void); +extern ir_op *op_EndReg; ir_op *get_op_EndReg (void); +extern ir_op *op_EndExcept; ir_op *get_op_EndExcept (void); /** Returns the ident for the opcode name */ diff --git a/ir/tr/trvrfy.c b/ir/tr/trvrfy.c index 731977a21..e85bcaf3e 100644 --- a/ir/tr/trvrfy.c +++ b/ir/tr/trvrfy.c @@ -62,7 +62,7 @@ static void check_tore(type_or_ent *tore, void *env) { } -int tr_vrfy() { +int tr_vrfy(void) { int res; type_walk(check_tore, NULL, &res); diff --git a/ir/tr/trvrfy.h b/ir/tr/trvrfy.h index c52e0079d..160d4ea09 100644 --- a/ir/tr/trvrfy.h +++ b/ir/tr/trvrfy.h @@ -36,6 +36,6 @@ enum trvrfy_error_codes { * 0 if graph is correct * else error code. */ -int tr_vrfy(); +int tr_vrfy(void); #endif /* TRVRFY_H */ diff --git a/ir/tr/type.h b/ir/tr/type.h index 6c8b89f3f..43819c06a 100644 --- a/ir/tr/type.h +++ b/ir/tr/type.h @@ -170,8 +170,8 @@ void set_type_link(type *tp, void *l); */ extern unsigned long type_visited; void set_master_type_visited(unsigned long val); -unsigned long get_master_type_visited(); -void inc_master_type_visited(); +unsigned long get_master_type_visited(void); +void inc_master_type_visited(void); /** * diff --git a/ir/tv/tv.h b/ir/tv/tv.h index ba6962d7b..6cd222dd5 100644 --- a/ir/tv/tv.h +++ b/ir/tv/tv.h @@ -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 */ -extern tarval *tarval_b_false; tarval *get_tarval_b_false (); -extern tarval *tarval_b_true; tarval *get_tarval_b_true (); -extern tarval *tarval_D_NaN; tarval *get_tarval_D_NaN (); -extern tarval *tarval_D_Inf; tarval *get_tarval_D_Inf (); -extern tarval *tarval_P_void; tarval *get_tarval_P_void (); +extern tarval *tarval_b_false; tarval *get_tarval_b_false (void); +extern tarval *tarval_b_true; tarval *get_tarval_b_true (void); +extern tarval *tarval_D_NaN; tarval *get_tarval_D_NaN (void); +extern tarval *tarval_D_Inf; tarval *get_tarval_D_Inf (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); /*@{*/ -- 2.20.1