removed C99 constructs
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 21 Dec 2004 16:47:57 +0000 (16:47 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 21 Dec 2004 16:47:57 +0000 (16:47 +0000)
[r4704]

ir/ir/irprintf.c
ir/ir/irvrfy.c
ir/ir/pseudo_irg.c

index 06dcd09..2d8e123 100644 (file)
@@ -24,6 +24,9 @@
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -225,8 +228,8 @@ static void dump_with_settings(const appender_t *app, void *object, size_t limit
        if(settings->width >= 0) {
                int i;
                size_t n = strlen(str);
-               int lim = MIN(settings->width, limit);
-               int to_print = MIN(lim, n);
+               int lim = MIN(settings->width, (int)limit);
+               int to_print = MIN(lim, (int)n);
                int to_pad = to_print - lim;
 
                if(!settings->left_just)
@@ -398,7 +401,7 @@ static void ir_common_vprintf(const appender_t *app, void *object,
 
                                                        case len_long_long:
                                                                {
-                                                                       long long arg = va_arg(args, long long);
+                                                                       int64_t arg = va_arg(args, int64_t);
                                                                        snprintf(buf, sizeof(buf), fmt_str, arg);
                                                                }
                                                                break;
index 62c86f2..f4ad315 100644 (file)
@@ -1055,7 +1055,9 @@ int irn_vrfy_irg(ir_node *n, ir_graph *irg)
 
       break;
 
-    case iro_Store:
+    case iro_Store: {
+      entity *target;
+
       op1mode = get_irn_mode(in[1]);
       op2mode = get_irn_mode(in[2]);
       op3mode = get_irn_mode(in[3]);
@@ -1066,7 +1068,7 @@ int irn_vrfy_irg(ir_node *n, ir_graph *irg)
                      );
       ASSERT_AND_RET(mymode == mode_T, "Store node", 0);
 
-      entity *target = get_ptr_entity(in[2]);
+      target = get_ptr_entity(in[2]);
       if (vrfy_entities && target && get_irg_phase_state(current_ir_graph) == phase_high) {
         /*
          * If lowered code, any Sels that add 0 may be removed, causing
@@ -1078,6 +1080,7 @@ int irn_vrfy_irg(ir_node *n, ir_graph *irg)
       }
 
       break;
+    }
 
     case iro_Alloc:
       op1mode = get_irn_mode(in[1]);
index 1df6053..968750d 100644 (file)
@@ -57,10 +57,12 @@ new_pseudo_ir_graph(entity *ent, int n_loc) {
 /** Returns true ir ir_graph is pseudo graph. */
 int is_pseudo_ir_graph(ir_graph *irg)
 {
+  int i, n_pseudo_irgs;
+
   assert(irg && "nothing here");
   assert(is_ir_graph(irg) && "no ir_graph given");
 
-  int i, n_pseudo_irgs = get_irp_n_pseudo_irgs();
+  n_pseudo_irgs = get_irp_n_pseudo_irgs();
   for (i = 0; i < n_pseudo_irgs; ++i) {
     if (irg == get_irp_pseudo_irg(i)) return true;
   }