fix a few -pedantic warnings
authorMatthias Braun <matze@braunis.de>
Mon, 17 Dec 2012 14:57:38 +0000 (15:57 +0100)
committerMatthias Braun <matze@braunis.de>
Mon, 17 Dec 2012 16:42:47 +0000 (17:42 +0100)
ir/ana/irlivechk.c
ir/be/arm/bearch_arm_t.h
ir/be/becopyheur.c
ir/debug/debugger.c
ir/ir/irtypes.h
ir/lpp/lpp_cplex.c
ir/lpp/lpp_cplex.h
ir/lpp/lpp_gurobi.c
ir/lpp/lpp_gurobi.h

index 11a28ac..8181ae9 100644 (file)
@@ -49,8 +49,8 @@
 typedef struct bl_info_t {
        const ir_node *block;      /**< The block. */
 
-       int be_tgt_calc : 1;
-       int id : 31;               /**< a tight number for the block.
+       unsigned be_tgt_calc : 1;
+       unsigned id : 31;          /**< a tight number for the block.
                                                                 we're just reusing the pre num from
                                                                 the DFS. */
        bitset_t *red_reachable;   /**< Holds all id's if blocks reachable
index 174829c..59dc29a 100644 (file)
@@ -73,12 +73,12 @@ enum arm_architectures {
 
 /** Floating point instruction set. */
 enum arm_fp_architectures {
-       ARM_FPU_FPA_EXT_V1     = 0x80000000, /**< Base FPA instruction set. */
-       ARM_FPU_FPA_EXT_V2     = 0x40000000, /**< LFM/SFM. */
-       ARM_FPU_VFP_EXT_NONE   = 0x20000000, /**< Use VFP word-ordering. */
-       ARM_FPU_VFP_EXT_V1xD   = 0x10000000, /**< Base VFP instruction set. */
-       ARM_FPU_VFP_EXT_V1     = 0x08000000, /**< Double-precision insns. */
-       ARM_FPU_VFP_EXT_V2     = 0x04000000, /**< ARM10E VFPr1. */
+       ARM_FPU_FPA_EXT_V1     = 0x40000000, /**< Base FPA instruction set. */
+       ARM_FPU_FPA_EXT_V2     = 0x20000000, /**< LFM/SFM. */
+       ARM_FPU_VFP_EXT_NONE   = 0x10000000, /**< Use VFP word-ordering. */
+       ARM_FPU_VFP_EXT_V1xD   = 0x08000000, /**< Base VFP instruction set. */
+       ARM_FPU_VFP_EXT_V1     = 0x04000000, /**< Double-precision insns. */
+       ARM_FPU_VFP_EXT_V2     = 0x02000000, /**< ARM10E VFPr1. */
 
        ARM_FPU_SOFTFLOAT      = 0x01000000, /**< soft float library */
        ARM_FPU_NONE           = 0,
@@ -93,7 +93,7 @@ enum arm_fp_architectures {
 
        ARM_FPU_ARCH_SOFTFLOAT = ARM_FPU_SOFTFLOAT,
 
-       ARM_FPU_MASK           = 0xff000000,
+       ARM_FPU_MASK           = 0x7f000000,
 };
 
 /** Returns non-zero if FPA instructions should be issued. */
index 53ea6e8..f104938 100644 (file)
@@ -57,8 +57,8 @@ typedef struct conflict_t {
  */
 typedef struct node_stat_t {
        ir_node *irn;
-       int     new_color;
-       int     pinned_local :1;
+       int      new_color;
+       unsigned pinned_local :1;
 } node_stat_t;
 
 /**
index aeed330..80e1d86 100644 (file)
@@ -807,7 +807,7 @@ static void show_by_name(type_or_ent tore, void *env)
                                        printf("%s", get_id_str(id));
                                }
                                if (irg)
-                                       printf("[%ld] (%p)\n", get_irg_graph_nr(irg), irg);
+                                       printf("[%ld] (%p)\n", get_irg_graph_nr(irg), (void*)irg);
                                else
                                        printf(" NULL\n");
                        }
@@ -836,7 +836,7 @@ static void show_by_ldname(type_or_ent tore, void *env)
                                        printf("%s", get_id_str(id));
                                }
                                if (irg)
-                                       printf("[%ld] (%p)\n", get_irg_graph_nr(irg), irg);
+                                       printf("[%ld] (%p)\n", get_irg_graph_nr(irg), (void*)irg);
                                else
                                        printf(" NULL\n");
                        }
index ce89755..c87843b 100644 (file)
@@ -265,16 +265,16 @@ typedef struct io_attr {
 /** Load attributes. */
 typedef struct load_attr {
        except_attr   exc;            /**< The exception attribute. MUST be the first one. */
-    ir_volatility volatility:1;   /**< The volatility of this Load operation. */
-    ir_align      unaligned:1;    /**< The align attribute of this Load operation. */
+       __extension__ ir_volatility volatility:1;   /**< The volatility of this Load operation. */
+       __extension__ ir_align      unaligned:1;    /**< The align attribute of this Load operation. */
        ir_mode       *mode;          /**< The mode of this Load operation. */
 } load_attr;
 
 /** Store attributes. */
 typedef struct store_attr {
        except_attr   exc;            /**< the exception attribute. MUST be the first one. */
-       ir_volatility volatility:1;   /**< The volatility of this Store operation. */
-       ir_align      unaligned:1;    /**< The align attribute of this Store operation. */
+       __extension__ ir_volatility volatility:1;   /**< The volatility of this Store operation. */
+       __extension__ ir_align      unaligned:1;    /**< The align attribute of this Store operation. */
 } store_attr;
 
 typedef struct phi_attr {
index 88187f1..636645e 100644 (file)
@@ -9,8 +9,10 @@
  */
 #include "config.h"
 
-#ifdef WITH_CPLEX
 #include "lpp_cplex.h"
+#include "error.h"
+
+#ifdef WITH_CPLEX
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -262,4 +264,12 @@ void lpp_solve_cplex(lpp_t *lpp)
        free_cpx(cpx);
 }
 
+#else
+
+void lpp_solve_cplex(lpp_t *lpp)
+{
+       (void)lpp;
+       panic("libfirm compiled without cplex support");
+}
+
 #endif
index 40b7412..7577373 100644 (file)
@@ -12,8 +12,6 @@
 
 #include "lpp.h"
 
-#ifdef WITH_CPLEX
 void lpp_solve_cplex(lpp_t *lpp);
-#endif
 
 #endif
index b363778..5f882dd 100644 (file)
@@ -9,8 +9,10 @@
  */
 #include "config.h"
 
-#ifdef WITH_GUROBI
 #include "lpp_gurobi.h"
+#include "error.h"
+
+#ifdef WITH_GUROBI
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -20,7 +22,6 @@
 
 #include <gurobi_c.h>
 
-#include "error.h"
 #include "sp_matrix.h"
 
 static char gurobi_cst_encoding[4] = { 0, GRB_EQUAL, GRB_LESS_EQUAL, GRB_GREATER_EQUAL };
@@ -225,4 +226,11 @@ void lpp_solve_gurobi(lpp_t *lpp)
        free_gurobi(grb);
 }
 
+#else
+
+void lpp_solve_gurobi(lpp_t *lpp)
+{
+       (void)lpp;
+}
+
 #endif
index 1e79ffd..e7bc9f4 100644 (file)
@@ -12,8 +12,6 @@
 
 #include "lpp.h"
 
-#ifdef WITH_GUROBI
 void lpp_solve_gurobi(lpp_t *lpp);
-#endif
 
 #endif