From: Boris Boesler Date: Fri, 23 Aug 2002 10:27:07 +0000 (+0000) Subject: compileable with -Wall and bugfixing X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=e05c39b81949eb6454a8d9e2374ddd2d1cec076d;p=libfirm compileable with -Wall and bugfixing [r463] --- diff --git a/ir/ana/cgana.c b/ir/ana/cgana.c index 21a387871..c7c09c309 100644 --- a/ir/ana/cgana.c +++ b/ir/ana/cgana.c @@ -20,7 +20,7 @@ #include "ircons.h" #include "irgmod.h" #include "xprintf.h" - +#include "irnode.h" /* Eindeutige Adresse zur Markierung von besuchten Knoten und zur * Darstellung der unbekannten Methode. */ diff --git a/ir/ana/irscc.c b/ir/ana/irscc.c index dfb51c301..ff6f10f4c 100644 --- a/ir/ana/irscc.c +++ b/ir/ana/irscc.c @@ -10,10 +10,15 @@ /* $Id$ */ +#include + #include "irloop_t.h" #include "irnode.h" #include "irgraph_t.h" #include "array.h" +#include "xprintf.h" +#include "irgwalk.h" + ir_graph *outermost_ir_graph; /* The outermost graph the scc is computed for */ diff --git a/ir/common/common.c b/ir/common/common.c index a7381ab6b..6782ee9ad 100644 --- a/ir/common/common.c +++ b/ir/common/common.c @@ -40,6 +40,7 @@ const char* print_firm_kind(void *firm_thing) { case k_type_primitive: { return "k_type_primitive"; } break; #endif case k_ir_node: { return "k_ir_node"; } break; + default: break; } return ""; } diff --git a/ir/ir/irgopt.c b/ir/ir/irgopt.c index c6c7f2024..1e1893de8 100644 --- a/ir/ir/irgopt.c +++ b/ir/ir/irgopt.c @@ -130,7 +130,7 @@ compute_new_arity(ir_node *b) { } } -static INLINE new_backedge_info(ir_node *n) { +static INLINE void new_backedge_info(ir_node *n) { switch(get_irn_opcode(n)) { case iro_Block: n->attr.block.cg_backedge = NULL; diff --git a/ir/ir/irgwalk.c b/ir/ir/irgwalk.c index c554e8111..1bbe1b209 100644 --- a/ir/ir/irgwalk.c +++ b/ir/ir/irgwalk.c @@ -14,6 +14,8 @@ # include #endif +# include + # include "irnode.h" # include "irgraph.h" /* visited flag */ # include "irprog.h" @@ -312,6 +314,7 @@ new_callsite_stack(ir_graph *g) { res->tos = 0; res->s = NEW_ARR_F (ir_node *, MIN_STACK_SIZE); set_irg_callsite_stack(g, res); + return(res); } static INLINE void diff --git a/ir/ir/irmode.c b/ir/ir/irmode.c index 995f6eeb3..1157f60a6 100644 --- a/ir/ir/irmode.c +++ b/ir/ir/irmode.c @@ -518,4 +518,5 @@ smaller_mode(ir_mode *sm, ir_mode *lm) { if ((mode_is_float(sm) && mode_is_float(lm)) && get_mode_modecode(sm) <= get_mode_modecode(lm)) return true; + return(false); } diff --git a/ir/ir/irnode.c b/ir/ir/irnode.c index 7a6d41ea0..78e7a9b97 100644 --- a/ir/ir/irnode.c +++ b/ir/ir/irnode.c @@ -19,6 +19,7 @@ #include "typegmod_t.h" #include "array.h" #include "irbackedge_t.h" +#include "irdump.h" #ifdef DEBUG_libfirm #include "irprog_t.h" diff --git a/ir/ir/irnode.h b/ir/ir/irnode.h index 281cfb9b3..cf4c98b78 100644 --- a/ir/ir/irnode.h +++ b/ir/ir/irnode.h @@ -297,6 +297,8 @@ INLINE ir_node *get_Call_param (ir_node *node, int pos); INLINE void set_Call_param (ir_node *node, int pos, ir_node *param); INLINE type *get_Call_type (ir_node *node); INLINE void set_Call_type (ir_node *node, type *type); +INLINE int get_Call_arity (ir_node *node); + /* Set, get and remove the callee-analysis. */ int get_Call_n_callees(ir_node * node); entity * get_Call_callee(ir_node * node, int pos); diff --git a/ir/ir/irprog.c b/ir/ir/irprog.c index 5fd231a05..4d3eef1d1 100644 --- a/ir/ir/irprog.c +++ b/ir/ir/irprog.c @@ -30,6 +30,20 @@ void init_irprog(void) { new_ir_prog (); } +INLINE void remove_irp_type_from_list (type *typ) { + int i; + assert(typ); + for (i = 1; i < (ARR_LEN (irp->types)); i++) { + if (irp->types[i] == typ) { + for(; i < (ARR_LEN (irp->types)) - 1; i++) { + irp->types[i] = irp->types[i+1]; + } + ARR_SETLEN(type*, irp->types, (ARR_LEN(irp->types)) - 1); + break; + } + } +} + /* Create a new ir prog. Automatically called by init_firm through init_irprog. */ ir_prog *new_ir_prog (void) { @@ -123,20 +137,6 @@ void add_irp_type(type *typ) { ARR_APP1 (type *, irp->types, typ); } -INLINE void remove_irp_type_from_list (type *typ) { - int i; - assert(typ); - for (i = 1; i < (ARR_LEN (irp->types)); i++) { - if (irp->types[i] == typ) { - for(; i < (ARR_LEN (irp->types)) - 1; i++) { - irp->types[i] = irp->types[i+1]; - } - ARR_SETLEN(type*, irp->types, (ARR_LEN(irp->types)) - 1); - break; - } - } -} - void remove_irp_type(type *typ) { remove_irp_type_from_list (typ); } diff --git a/ir/tr/type.c b/ir/tr/type.c index 19f460001..b1883b717 100644 --- a/ir/tr/type.c +++ b/ir/tr/type.c @@ -33,6 +33,7 @@ # include # include +# include # include "type_t.h" # include "tpop_t.h" # include "typegmod_t.h"