From 6bd6178de9f5e72b20377514a4af6e4164a5bcca Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Mon, 4 Oct 1993 18:01:19 -0400 Subject: [PATCH] (bc_init_mode_to_opcode_maps, bc_expand_expr): Cast enum array indices to int. (bc_load_memory, bc_store_memory): Likewise. (bc_runtime_type_code): Cast enum logical operand to int. From-SVN: r5592 --- gcc/expr.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gcc/expr.c b/gcc/expr.c index a0a6ba8af68..43899e3ff82 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -228,15 +228,15 @@ bc_init_mode_to_opcode_maps () { int mode; - for (mode = 0; mode < MAX_MACHINE_MODE; mode++) + for (mode = 0; mode < (int) MAX_MACHINE_MODE; mode++) mode_to_const_map[mode] = mode_to_load_map[mode] = mode_to_store_map[mode] = neverneverland; #define DEF_MODEMAP(SYM, CODE, UCODE, CONST, LOAD, STORE) \ - mode_to_const_map[(enum machine_mode) SYM] = CONST; \ - mode_to_load_map[(enum machine_mode) SYM] = LOAD; \ - mode_to_store_map[(enum machine_mode) SYM] = STORE; + mode_to_const_map[(int) SYM] = CONST; \ + mode_to_load_map[(int) SYM] = LOAD; \ + mode_to_store_map[(int) SYM] = STORE; #include "modemap.def" #undef DEF_MODEMAP @@ -5855,9 +5855,9 @@ bc_expand_expr (exp) #ifdef DEBUG_PRINT_CODE fprintf (stderr, " [%x]\n", TREE_INT_CST_LOW (exp)); #endif - bc_emit_instruction (mode_to_const_map[DECL_BIT_FIELD (exp) + bc_emit_instruction (mode_to_const_map[(int) (DECL_BIT_FIELD (exp) ? SImode - : TYPE_MODE (TREE_TYPE (exp))], + : TYPE_MODE (TREE_TYPE (exp)))], (HOST_WIDE_INT) TREE_INT_CST_LOW (exp)); return; @@ -9077,7 +9077,7 @@ bc_load_memory (type, decl) || TYPE_MODE (type) == VOIDmode) return; else - opcode = mode_to_load_map [TYPE_MODE (type)]; + opcode = mode_to_load_map [(int) TYPE_MODE (type)]; if (opcode == neverneverland) abort (); @@ -9124,7 +9124,7 @@ bc_store_memory (type, decl) opcode = storeBLK; } else - opcode = mode_to_store_map [TYPE_MODE (type)]; + opcode = mode_to_store_map [(int) TYPE_MODE (type)]; if (opcode == neverneverland) abort (); @@ -9497,7 +9497,7 @@ bc_runtime_type_code (type) case POINTER_TYPE: case RECORD_TYPE: - val = TYPE_MODE (type) | TYPE_ALIGN (type) << 8; + val = (int) TYPE_MODE (type) | TYPE_ALIGN (type) << 8; break; case ERROR_MARK: -- 2.30.2