fix some cparser warnings
[cparser] / ast2firm.c
index 53edbdd..a37206d 100644 (file)
@@ -49,7 +49,6 @@
 #include "printer.h"
 #include "entitymap_t.h"
 #include "driver/firm_opt.h"
-#include "driver/firm_cmdline.h"
 
 typedef struct trampoline_region trampoline_region;
 struct trampoline_region {
@@ -57,6 +56,8 @@ struct trampoline_region {
        ir_entity        *region;      /**< created region for the trampoline */
 };
 
+fp_model_t firm_fp_model = fp_model_precise;
+
 static const backend_params *be_params;
 
 static ir_type *ir_type_char;
@@ -435,9 +436,9 @@ static ir_type *create_pointer_type(pointer_type_t *type)
        type_dbg_info *dbgi         = get_type_dbg_info_((const type_t*) type);
        type_t        *points_to    = type->points_to;
        ir_type       *ir_points_to = get_ir_type_incomplete(points_to);
-       ir_type       *ir_type      = new_d_type_pointer(ir_points_to, dbgi);
+       ir_type       *irtype       = new_d_type_pointer(ir_points_to, dbgi);
 
-       return ir_type;
+       return irtype;
 }
 
 static ir_type *create_reference_type(reference_type_t *type)
@@ -445,9 +446,9 @@ static ir_type *create_reference_type(reference_type_t *type)
        type_dbg_info *dbgi         = get_type_dbg_info_((const type_t*) type);
        type_t        *refers_to    = type->refers_to;
        ir_type       *ir_refers_to = get_ir_type_incomplete(refers_to);
-       ir_type       *ir_type      = new_d_type_pointer(ir_refers_to, dbgi);
+       ir_type       *irtype       = new_d_type_pointer(ir_refers_to, dbgi);
 
-       return ir_type;
+       return irtype;
 }
 
 static ir_type *create_array_type(array_type_t *type)
@@ -455,27 +456,27 @@ static ir_type *create_array_type(array_type_t *type)
        type_dbg_info *dbgi            = get_type_dbg_info_((const type_t*) type);
        type_t        *element_type    = type->element_type;
        ir_type       *ir_element_type = get_ir_type(element_type);
-       ir_type       *ir_type         = new_d_type_array(1, ir_element_type, dbgi);
+       ir_type       *irtype          = new_d_type_array(1, ir_element_type, dbgi);
 
        const int align = get_type_alignment_bytes(ir_element_type);
-       set_type_alignment_bytes(ir_type, align);
+       set_type_alignment_bytes(irtype, align);
 
        if (type->size_constant) {
                int n_elements = type->size;
 
-               set_array_bounds_int(ir_type, 0, 0, n_elements);
+               set_array_bounds_int(irtype, 0, 0, n_elements);
 
                size_t elemsize = get_type_size_bytes(ir_element_type);
                if (elemsize % align > 0) {
                        elemsize += align - (elemsize % align);
                }
-               set_type_size_bytes(ir_type, n_elements * elemsize);
+               set_type_size_bytes(irtype, n_elements * elemsize);
        } else {
-               set_array_lower_bound_int(ir_type, 0, 0);
+               set_array_lower_bound_int(irtype, 0, 0);
        }
-       set_type_state(ir_type, layout_fixed);
+       set_type_state(irtype, layout_fixed);
 
-       return ir_type;
+       return irtype;
 }
 
 /**
@@ -5803,7 +5804,7 @@ static void create_function(entity_t *entity)
        ir_graph *old_current_function = current_function;
        current_function = irg;
 
-       set_irg_fp_model(irg, firm_opt.fp_model);
+       set_irg_fp_model(irg, firm_fp_model);
        tarval_enable_fp_ops(1);
        set_irn_dbg_info(get_irg_start_block(irg),
                         get_entity_dbg_info(function_entity));