Commit dbbbbf3b by John David Anglin Committed by John David Anglin

print-rtl.c (print_rtx): Cast enums to int for comparison.

	* print-rtl.c (print_rtx): Cast enums to int for comparison.
	* c-decl.c (grokdeclarator): Cast enums to int for comparison and
	shifts.
	* c-format.c (C_STD_VER): Cast to int for comparisons.
	(check_function_format): Cast various enums to int for &.
	(maybe_read_dollar_number): Likewise.
	(check_format_info): Likewise.
	(check_format_info_main): Likewise.
	* expr.c (emit_move_insn_1): Cast enums to unsigned int for comparison.
	(safe_from_p): Likewise.
	* varasm.c (const_hash): Cast enum to int for %.
	* emit-rtl.c (init_emit_once): Use int loop variable to work around
	pcc enum problems with < and ++ operators.
	* regclass.c (init_reg_sets_1): Cast enums for comparison.
	(choose_hard_reg_mode): Use unsigned int to iterate over CCmodes.
	(regclass_init): Change enum class to int to iterate over reg_classes.
	* genrecog.c (merge_trees): Cast enums for comparison.
	* rtl.h (GET_CODE): Cast to enum rtx_code.
	(PUT_CODE): Cast to ENUM_BITFIELD(rtx_code).
	(GET_MODE): Cast to enum machine_mode.
	(PUT_MODE): Cast to ENUM_BITFIELD(machine_mode).
	(GET_NOTE_INSN_NAME): Cast enum to int.
	* tree.h (TREE_CODE): Cast to enum tree_code.
	(TREE_SET_CODE): Cast VALUE to ENUM_BITFIELD(tree_code).
        * timevar.c (timevar_print): Change loop variable id from enum to
	unsigned int.
	* fixinc/fixincl.c (VLEVEL): Cast enums in comparison to unsigned int.
	* config/i386/i386.md: Use PUT_MODE for mode assignment.
	* toplev.c (compile_file): Cast enum DFI to int.
	(decode_d_option): Likewise.

From-SVN: r40193
parent 4cacbdf2
2001-03-02 John David Anglin <dave@hiauly1.hia.nrc.ca>
* print-rtl.c (print_rtx): Cast enums to int for comparison.
* c-decl.c (grokdeclarator): Cast enums to int for comparison and
shifts.
* c-format.c (C_STD_VER): Cast to int for comparisons.
(check_function_format): Cast various enums to int for &.
(maybe_read_dollar_number): Likewise.
(check_format_info): Likewise.
(check_format_info_main): Likewise.
* expr.c (emit_move_insn_1): Cast enums to unsigned int for comparison.
(safe_from_p): Likewise.
* varasm.c (const_hash): Cast enum to int for %.
* emit-rtl.c (init_emit_once): Use int loop variable to work around
pcc enum problems with < and ++ operators.
* regclass.c (init_reg_sets_1): Cast enums for comparison.
(choose_hard_reg_mode): Use unsigned int to iterate over CCmodes.
(regclass_init): Change enum class to int to iterate over reg_classes.
* genrecog.c (merge_trees): Cast enums for comparison.
* rtl.h (GET_CODE): Cast to enum rtx_code.
(PUT_CODE): Cast to ENUM_BITFIELD(rtx_code).
(GET_MODE): Cast to enum machine_mode.
(PUT_MODE): Cast to ENUM_BITFIELD(machine_mode).
(GET_NOTE_INSN_NAME): Cast enum to int.
* tree.h (TREE_CODE): Cast to enum tree_code.
(TREE_SET_CODE): Cast VALUE to ENUM_BITFIELD(tree_code).
* timevar.c (timevar_print): Change loop variable id from enum to
unsigned int.
* fixinc/fixincl.c (VLEVEL): Cast enums in comparison to unsigned int.
* config/i386/i386.md: Use PUT_MODE for mode assignment.
* toplev.c (compile_file): Cast enum DFI to int.
(decode_d_option): Likewise.
Fri Mar 2 12:18:13 2001 Christopher Faylor <cgf@cygnus.com> Fri Mar 2 12:18:13 2001 Christopher Faylor <cgf@cygnus.com>
* cppinit.c (append_include_chain): Mark "after" include file name list * cppinit.c (append_include_chain): Mark "after" include file name list
......
...@@ -3929,9 +3929,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) ...@@ -3929,9 +3929,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
if (TREE_CODE (id) == IDENTIFIER_NODE && C_IS_RESERVED_WORD (id)) if (TREE_CODE (id) == IDENTIFIER_NODE && C_IS_RESERVED_WORD (id))
{ {
enum rid i = C_RID_CODE (id); enum rid i = C_RID_CODE (id);
if (i <= RID_LAST_MODIFIER) if ((int) i <= (int) RID_LAST_MODIFIER)
{ {
if (i == RID_LONG && specbits & (1<<i)) if (i == RID_LONG && (specbits & (1 << (int) i)))
{ {
if (longlong) if (longlong)
error ("`long long long' is too long for GCC"); error ("`long long long' is too long for GCC");
...@@ -3943,9 +3943,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) ...@@ -3943,9 +3943,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
longlong = 1; longlong = 1;
} }
} }
else if (specbits & (1 << i)) else if (specbits & (1 << (int) i))
pedwarn ("duplicate `%s'", IDENTIFIER_POINTER (id)); pedwarn ("duplicate `%s'", IDENTIFIER_POINTER (id));
specbits |= 1 << i; specbits |= 1 << (int) i;
goto found; goto found;
} }
} }
......
...@@ -476,11 +476,11 @@ enum format_std_version ...@@ -476,11 +476,11 @@ enum format_std_version
or inheriting from, for the purpose of format features supported. */ or inheriting from, for the purpose of format features supported. */
#define CPLUSPLUS_STD_VER STD_C89 #define CPLUSPLUS_STD_VER STD_C89
/* The C standard version we are checking formats against when pedantic. */ /* The C standard version we are checking formats against when pedantic. */
#define C_STD_VER (c_language == clk_cplusplus \ #define C_STD_VER ((int)(c_language == clk_cplusplus \
? CPLUSPLUS_STD_VER \ ? CPLUSPLUS_STD_VER \
: (flag_isoc99 \ : (flag_isoc99 \
? STD_C99 \ ? STD_C99 \
: (flag_isoc94 ? STD_C94 : STD_C89))) : (flag_isoc94 ? STD_C94 : STD_C89))))
/* The name to give to the standard version we are warning about when /* The name to give to the standard version we are warning about when
pedantic. FEATURE_VER is the version in which the feature warned out pedantic. FEATURE_VER is the version in which the feature warned out
appeared, which is higher than C_STD_VER. */ appeared, which is higher than C_STD_VER. */
...@@ -1105,7 +1105,8 @@ check_function_format (status, name, assembler_name, params) ...@@ -1105,7 +1105,8 @@ check_function_format (status, name, assembler_name, params)
/* Yup; check it. */ /* Yup; check it. */
check_format_info (status, info, params); check_format_info (status, info, params);
if (warn_missing_format_attribute && info->first_arg_num == 0 if (warn_missing_format_attribute && info->first_arg_num == 0
&& (format_types[info->format_type].flags & FMT_FLAG_ARG_CONVERT)) && (format_types[info->format_type].flags
& (int) FMT_FLAG_ARG_CONVERT))
{ {
function_format_info *info2; function_format_info *info2;
for (info2 = function_format_list; info2; info2 = info2->next) for (info2 = function_format_list; info2; info2 = info2->next)
...@@ -1298,7 +1299,7 @@ maybe_read_dollar_number (status, format, dollar_needed, params, param_ptr, ...@@ -1298,7 +1299,7 @@ maybe_read_dollar_number (status, format, dollar_needed, params, param_ptr,
nalloc - dollar_arguments_alloc); nalloc - dollar_arguments_alloc);
dollar_arguments_alloc = nalloc; dollar_arguments_alloc = nalloc;
} }
if (!(fki->flags & FMT_FLAG_DOLLAR_MULTIPLE) if (!(fki->flags & (int) FMT_FLAG_DOLLAR_MULTIPLE)
&& dollar_arguments_used[argnum - 1] == 1) && dollar_arguments_used[argnum - 1] == 1)
{ {
dollar_arguments_used[argnum - 1] = 2; dollar_arguments_used[argnum - 1] = 2;
...@@ -1434,7 +1435,7 @@ check_format_info (status, info, params) ...@@ -1434,7 +1435,7 @@ check_format_info (status, info, params)
/* Functions taking a va_list normally pass a non-literal format /* Functions taking a va_list normally pass a non-literal format
string. These functions typically are declared with string. These functions typically are declared with
first_arg_num == 0, so avoid warning in those cases. */ first_arg_num == 0, so avoid warning in those cases. */
if (!(format_types[info->format_type].flags & FMT_FLAG_ARG_CONVERT)) if (!(format_types[info->format_type].flags & (int) FMT_FLAG_ARG_CONVERT))
{ {
/* For strftime-like formats, warn for not checking the format /* For strftime-like formats, warn for not checking the format
string; but there are no arguments to check. */ string; but there are no arguments to check. */
...@@ -1746,7 +1747,7 @@ check_format_info_main (status, res, info, format_chars, format_length, ...@@ -1746,7 +1747,7 @@ check_format_info_main (status, res, info, format_chars, format_length,
} }
flag_chars[0] = 0; flag_chars[0] = 0;
if ((fki->flags & FMT_FLAG_USE_DOLLAR) && has_operand_number != 0) if ((fki->flags & (int) FMT_FLAG_USE_DOLLAR) && has_operand_number != 0)
{ {
/* Possibly read a $ operand number at the start of the format. /* Possibly read a $ operand number at the start of the format.
If one was previously used, one is required here. If one If one was previously used, one is required here. If one
...@@ -1867,7 +1868,7 @@ check_format_info_main (status, res, info, format_chars, format_length, ...@@ -1867,7 +1868,7 @@ check_format_info_main (status, res, info, format_chars, format_length,
++format_chars; ++format_chars;
} }
if (found_width && !non_zero_width_char && if (found_width && !non_zero_width_char &&
(fki->flags & FMT_FLAG_ZERO_WIDTH_BAD)) (fki->flags & (int) FMT_FLAG_ZERO_WIDTH_BAD))
status_warning (status, "zero width in %s format", status_warning (status, "zero width in %s format",
fki->name); fki->name);
if (found_width) if (found_width)
...@@ -1954,7 +1955,7 @@ check_format_info_main (status, res, info, format_chars, format_length, ...@@ -1954,7 +1955,7 @@ check_format_info_main (status, res, info, format_chars, format_length,
} }
else else
{ {
if (!(fki->flags & FMT_FLAG_EMPTY_PREC_OK) if (!(fki->flags & (int) FMT_FLAG_EMPTY_PREC_OK)
&& !ISDIGIT (*format_chars)) && !ISDIGIT (*format_chars))
status_warning (status, "empty precision in %s format", status_warning (status, "empty precision in %s format",
fki->name); fki->name);
...@@ -2025,7 +2026,7 @@ check_format_info_main (status, res, info, format_chars, format_length, ...@@ -2025,7 +2026,7 @@ check_format_info_main (status, res, info, format_chars, format_length,
} }
/* Handle the scanf allocation kludge. */ /* Handle the scanf allocation kludge. */
if (fki->flags & FMT_FLAG_SCANF_A_KLUDGE) if (fki->flags & (int) FMT_FLAG_SCANF_A_KLUDGE)
{ {
if (*format_chars == 'a' && !flag_isoc99) if (*format_chars == 'a' && !flag_isoc99)
{ {
...@@ -2043,7 +2044,8 @@ check_format_info_main (status, res, info, format_chars, format_length, ...@@ -2043,7 +2044,8 @@ check_format_info_main (status, res, info, format_chars, format_length,
format_char = *format_chars; format_char = *format_chars;
if (format_char == 0 if (format_char == 0
|| (!(fki->flags & FMT_FLAG_FANCY_PERCENT_OK) && format_char == '%')) || (!(fki->flags & (int) FMT_FLAG_FANCY_PERCENT_OK)
&& format_char == '%'))
{ {
status_warning (status, "conversion lacks type at end of format"); status_warning (status, "conversion lacks type at end of format");
continue; continue;
...@@ -2109,7 +2111,7 @@ check_format_info_main (status, res, info, format_chars, format_length, ...@@ -2109,7 +2111,7 @@ check_format_info_main (status, res, info, format_chars, format_length,
flag_chars[i - d] = 0; flag_chars[i - d] = 0;
} }
if ((fki->flags & FMT_FLAG_SCANF_A_KLUDGE) if ((fki->flags & (int) FMT_FLAG_SCANF_A_KLUDGE)
&& strchr (flag_chars, 'a') != 0) && strchr (flag_chars, 'a') != 0)
aflag = 1; aflag = 1;
...@@ -2190,7 +2192,7 @@ check_format_info_main (status, res, info, format_chars, format_length, ...@@ -2190,7 +2192,7 @@ check_format_info_main (status, res, info, format_chars, format_length,
wanted_type = 0; wanted_type = 0;
wanted_type_name = 0; wanted_type_name = 0;
if (fki->flags & FMT_FLAG_ARG_CONVERT) if (fki->flags & (int) FMT_FLAG_ARG_CONVERT)
{ {
wanted_type = (fci->types[length_chars_val].type wanted_type = (fci->types[length_chars_val].type
? *fci->types[length_chars_val].type : 0); ? *fci->types[length_chars_val].type : 0);
......
...@@ -12759,7 +12759,7 @@ ...@@ -12759,7 +12759,7 @@
operands[1] = gen_lowpart (SImode, operands[1]); operands[1] = gen_lowpart (SImode, operands[1]);
if (GET_CODE (operands[3]) != ASHIFT) if (GET_CODE (operands[3]) != ASHIFT)
operands[2] = gen_lowpart (SImode, operands[2]); operands[2] = gen_lowpart (SImode, operands[2]);
GET_MODE (operands[3]) = SImode;") PUT_MODE (operands[3], SImode);")
(define_split (define_split
[(set (reg 17) [(set (reg 17)
......
...@@ -4140,9 +4140,9 @@ init_emit_once (line_numbers) ...@@ -4140,9 +4140,9 @@ init_emit_once (line_numbers)
const_tiny_rtx[i][(int) mode] = GEN_INT (i); const_tiny_rtx[i][(int) mode] = GEN_INT (i);
} }
for (mode = CCmode; mode < MAX_MACHINE_MODE; ++mode) for (i = (int) CCmode; i < (int) MAX_MACHINE_MODE; ++i)
if (GET_MODE_CLASS (mode) == MODE_CC) if (GET_MODE_CLASS ((enum machine_mode) i) == MODE_CC)
const_tiny_rtx[0][(int) mode] = const0_rtx; const_tiny_rtx[0][i] = const0_rtx;
const_tiny_rtx[0][(int) BImode] = const0_rtx; const_tiny_rtx[0][(int) BImode] = const0_rtx;
if (STORE_FLAG_VALUE == 1) if (STORE_FLAG_VALUE == 1)
......
...@@ -2766,7 +2766,7 @@ emit_move_insn_1 (x, y) ...@@ -2766,7 +2766,7 @@ emit_move_insn_1 (x, y)
enum mode_class class = GET_MODE_CLASS (mode); enum mode_class class = GET_MODE_CLASS (mode);
unsigned int i; unsigned int i;
if (mode >= MAX_MACHINE_MODE) if ((unsigned int) mode >= (unsigned int) MAX_MACHINE_MODE)
abort (); abort ();
if (mov_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing) if (mov_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing)
...@@ -5766,7 +5766,8 @@ safe_from_p (x, exp, top_p) ...@@ -5766,7 +5766,8 @@ safe_from_p (x, exp, top_p)
/* If this is a language-specific tree code, it may require /* If this is a language-specific tree code, it may require
special handling. */ special handling. */
if (TREE_CODE (exp) >= LAST_AND_UNUSED_TREE_CODE if ((unsigned int) TREE_CODE (exp)
>= (unsigned int) LAST_AND_UNUSED_TREE_CODE
&& lang_safe_from_p && lang_safe_from_p
&& !(*lang_safe_from_p) (x, exp)) && !(*lang_safe_from_p) (x, exp))
return 0; return 0;
......
...@@ -67,7 +67,7 @@ typedef enum { ...@@ -67,7 +67,7 @@ typedef enum {
te_verbose verbose_level = VERB_PROGRESS; te_verbose verbose_level = VERB_PROGRESS;
int have_tty = 0; int have_tty = 0;
#define VLEVEL(l) (verbose_level >= l) #define VLEVEL(l) ((unsigned int) verbose_level >= (unsigned int) l)
#define NOT_SILENT VLEVEL(VERB_FIXES) #define NOT_SILENT VLEVEL(VERB_FIXES)
pid_t process_chain_head = (pid_t) -1; pid_t process_chain_head = (pid_t) -1;
......
...@@ -1432,7 +1432,7 @@ merge_trees (oldh, addh) ...@@ -1432,7 +1432,7 @@ merge_trees (oldh, addh)
how expensive/important the test is. Given that the tests how expensive/important the test is. Given that the tests
are also ordered within the list, examining the first is are also ordered within the list, examining the first is
sufficient. */ sufficient. */
if (add->tests->type < old->tests->type) if ((int) add->tests->type < (int) old->tests->type)
insert_before = old; insert_before = old;
} }
......
...@@ -373,8 +373,8 @@ print_rtx (in_rtx) ...@@ -373,8 +373,8 @@ print_rtx (in_rtx)
/* Print NOTE_INSN names rather than integer codes. */ /* Print NOTE_INSN names rather than integer codes. */
case 'n': case 'n':
if (XINT (in_rtx, i) >= NOTE_INSN_BIAS if (XINT (in_rtx, i) >= (int) NOTE_INSN_BIAS
&& XINT (in_rtx, i) < NOTE_INSN_MAX) && XINT (in_rtx, i) < (int) NOTE_INSN_MAX)
fprintf (outfile, " %s", GET_NOTE_INSN_NAME (XINT (in_rtx, i))); fprintf (outfile, " %s", GET_NOTE_INSN_NAME (XINT (in_rtx, i)));
else else
fprintf (outfile, " %d", XINT (in_rtx, i)); fprintf (outfile, " %d", XINT (in_rtx, i));
......
...@@ -430,7 +430,7 @@ init_reg_sets_1 () ...@@ -430,7 +430,7 @@ init_reg_sets_1 ()
} }
memset (contains_reg_of_mode, 0, sizeof (contains_reg_of_mode)); memset (contains_reg_of_mode, 0, sizeof (contains_reg_of_mode));
memset (allocatable_regs_of_mode, 0, sizeof (allocatable_regs_of_mode)); memset (allocatable_regs_of_mode, 0, sizeof (allocatable_regs_of_mode));
for (m = 0; m < MAX_MACHINE_MODE; m++) for (m = 0; m < (unsigned int) MAX_MACHINE_MODE; m++)
for (i = 0; i < N_REG_CLASSES; i++) for (i = 0; i < N_REG_CLASSES; i++)
if (CLASS_MAX_NREGS (i, m) <= reg_class_size[i]) if (CLASS_MAX_NREGS (i, m) <= reg_class_size[i])
for (j = 0; j < FIRST_PSEUDO_REGISTER; j++) for (j = 0; j < FIRST_PSEUDO_REGISTER; j++)
...@@ -445,7 +445,7 @@ init_reg_sets_1 () ...@@ -445,7 +445,7 @@ init_reg_sets_1 ()
/* Initialize the move cost table. Find every subset of each class /* Initialize the move cost table. Find every subset of each class
and take the maximum cost of moving any subset to any other. */ and take the maximum cost of moving any subset to any other. */
for (m = 0; m < MAX_MACHINE_MODE; m++) for (m = 0; m < (unsigned int) MAX_MACHINE_MODE; m++)
if (allocatable_regs_of_mode [m]) if (allocatable_regs_of_mode [m])
{ {
for (i = 0; i < N_REG_CLASSES; i++) for (i = 0; i < N_REG_CLASSES; i++)
...@@ -631,6 +631,7 @@ choose_hard_reg_mode (regno, nregs) ...@@ -631,6 +631,7 @@ choose_hard_reg_mode (regno, nregs)
unsigned int regno ATTRIBUTE_UNUSED; unsigned int regno ATTRIBUTE_UNUSED;
unsigned int nregs; unsigned int nregs;
{ {
unsigned int /* enum machine_mode */ m;
enum machine_mode found_mode = VOIDmode, mode; enum machine_mode found_mode = VOIDmode, mode;
/* We first look for the largest integer mode that can be validly /* We first look for the largest integer mode that can be validly
...@@ -658,10 +659,13 @@ choose_hard_reg_mode (regno, nregs) ...@@ -658,10 +659,13 @@ choose_hard_reg_mode (regno, nregs)
return found_mode; return found_mode;
/* Iterate over all of the CCmodes. */ /* Iterate over all of the CCmodes. */
for (mode = CCmode; mode < NUM_MACHINE_MODES; ++mode) for (m = (unsigned int) CCmode; m < (unsigned int) NUM_MACHINE_MODES; ++m)
if (HARD_REGNO_NREGS (regno, mode) == nregs {
&& HARD_REGNO_MODE_OK (regno, mode)) mode = (enum machine_mode) m;
return mode; if (HARD_REGNO_NREGS (regno, mode) == nregs
&& HARD_REGNO_MODE_OK (regno, mode))
return mode;
}
/* We can't find a mode valid for this register. */ /* We can't find a mode valid for this register. */
return VOIDmode; return VOIDmode;
...@@ -859,22 +863,23 @@ dump_regclass (dump) ...@@ -859,22 +863,23 @@ dump_regclass (dump)
int i; int i;
for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++) for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
{ {
enum reg_class class; int /* enum reg_class */ class;
if (REG_N_REFS (i)) if (REG_N_REFS (i))
{ {
fprintf (dump, " Register %i costs:", i); fprintf (dump, " Register %i costs:", i);
for (class = 0; class < N_REG_CLASSES; class++) for (class = 0; class < (int) N_REG_CLASSES; class++)
if (contains_reg_of_mode [class][PSEUDO_REGNO_MODE (i)] if (contains_reg_of_mode [(enum reg_class) class][PSEUDO_REGNO_MODE (i)]
#ifdef FORBIDDEN_INC_DEC_CLASSES #ifdef FORBIDDEN_INC_DEC_CLASSES
&& (!in_inc_dec[i] || !forbidden_inc_dec_class[class]) && (!in_inc_dec[i]
|| !forbidden_inc_dec_class[(enum reg_class) class])
#endif #endif
#ifdef CLASS_CANNOT_CHANGE_MODE #ifdef CLASS_CANNOT_CHANGE_MODE
&& (!REGNO_REG_SET_P (reg_changes_mode, i) && (!REGNO_REG_SET_P (reg_changes_mode, i)
|| class_can_change_mode [class]) || class_can_change_mode [(enum reg_class) class])
#endif #endif
) )
fprintf (dump, " %s:%i", reg_class_names[(int) class], fprintf (dump, " %s:%i", reg_class_names[class],
costs[i].cost[class]); costs[i].cost[(enum reg_class) class]);
fprintf (dump, " MEM:%i\n", costs[i].mem_cost); fprintf (dump, " MEM:%i\n", costs[i].mem_cost);
} }
} }
......
...@@ -184,11 +184,11 @@ typedef struct rtx_def ...@@ -184,11 +184,11 @@ typedef struct rtx_def
/* Define macros to access the `code' field of the rtx. */ /* Define macros to access the `code' field of the rtx. */
#define GET_CODE(RTX) ((RTX)->code) #define GET_CODE(RTX) ((enum rtx_code) (RTX)->code)
#define PUT_CODE(RTX, CODE) ((RTX)->code = (CODE)) #define PUT_CODE(RTX, CODE) ((RTX)->code = (ENUM_BITFIELD(rtx_code)) (CODE))
#define GET_MODE(RTX) ((RTX)->mode) #define GET_MODE(RTX) ((enum machine_mode) (RTX)->mode)
#define PUT_MODE(RTX, MODE) ((RTX)->mode = (MODE)) #define PUT_MODE(RTX, MODE) ((RTX)->mode = (ENUM_BITFIELD(machine_mode)) (MODE))
#define RTX_INTEGRATED_P(RTX) ((RTX)->integrated) #define RTX_INTEGRATED_P(RTX) ((RTX)->integrated)
#define RTX_UNCHANGING_P(RTX) ((RTX)->unchanging) #define RTX_UNCHANGING_P(RTX) ((RTX)->unchanging)
...@@ -702,7 +702,7 @@ enum insn_note ...@@ -702,7 +702,7 @@ enum insn_note
extern const char * const note_insn_name[NOTE_INSN_MAX - NOTE_INSN_BIAS]; extern const char * const note_insn_name[NOTE_INSN_MAX - NOTE_INSN_BIAS];
#define GET_NOTE_INSN_NAME(NOTE_CODE) \ #define GET_NOTE_INSN_NAME(NOTE_CODE) \
(note_insn_name[(NOTE_CODE) - NOTE_INSN_BIAS]) (note_insn_name[(NOTE_CODE) - (int) NOTE_INSN_BIAS])
/* The name of a label, in case it corresponds to an explicit label /* The name of a label, in case it corresponds to an explicit label
in the input source code. */ in the input source code. */
......
...@@ -401,7 +401,7 @@ timevar_print (fp) ...@@ -401,7 +401,7 @@ timevar_print (fp)
{ {
/* Only print stuff if we have some sort of time information. */ /* Only print stuff if we have some sort of time information. */
#if defined (HAVE_USER_TIME) || defined (HAVE_SYS_TIME) || defined (HAVE_WALL_TIME) #if defined (HAVE_USER_TIME) || defined (HAVE_SYS_TIME) || defined (HAVE_WALL_TIME)
timevar_id_t id; unsigned int /* timevar_id_t */ id;
struct timevar_time_def *total = &timevars[TV_TOTAL].elapsed; struct timevar_time_def *total = &timevars[TV_TOTAL].elapsed;
struct timevar_time_def now; struct timevar_time_def now;
...@@ -426,13 +426,13 @@ timevar_print (fp) ...@@ -426,13 +426,13 @@ timevar_print (fp)
start_time = now; start_time = now;
fprintf (fp, _("\nExecution times (seconds)\n")); fprintf (fp, _("\nExecution times (seconds)\n"));
for (id = 0; id < TIMEVAR_LAST; ++id) for (id = 0; id < (unsigned int) TIMEVAR_LAST; ++id)
{ {
struct timevar_def *tv = &timevars[id]; struct timevar_def *tv = &timevars[(timevar_id_t) id];
/* Don't print the total execution time here; that goes at the /* Don't print the total execution time here; that goes at the
end. */ end. */
if (id == TV_TOTAL) if ((timevar_id_t) id == TV_TOTAL)
continue; continue;
/* Don't print timing variables that were never used. */ /* Don't print timing variables that were never used. */
......
...@@ -2500,7 +2500,7 @@ compile_file (name) ...@@ -2500,7 +2500,7 @@ compile_file (name)
{ {
int i; int i;
for (i = 0; i < DFI_MAX; ++i) for (i = 0; i < (int) DFI_MAX; ++i)
if (dump_file[i].initialized && dump_file[i].graph_dump_p) if (dump_file[i].initialized && dump_file[i].graph_dump_p)
{ {
char seq[16]; char seq[16];
...@@ -4021,7 +4021,7 @@ decode_d_option (arg) ...@@ -4021,7 +4021,7 @@ decode_d_option (arg)
switch (c = *arg++) switch (c = *arg++)
{ {
case 'a': case 'a':
for (i = 0; i < DFI_MAX; ++i) for (i = 0; i < (int) DFI_MAX; ++i)
dump_file[i].enabled = 1; dump_file[i].enabled = 1;
break; break;
case 'A': case 'A':
...@@ -4052,7 +4052,7 @@ decode_d_option (arg) ...@@ -4052,7 +4052,7 @@ decode_d_option (arg)
default: default:
matched = 0; matched = 0;
for (i = 0; i < DFI_MAX; ++i) for (i = 0; i < (int) DFI_MAX; ++i)
if (c == dump_file[i].debug_switch) if (c == dump_file[i].debug_switch)
{ {
dump_file[i].enabled = 1; dump_file[i].enabled = 1;
......
...@@ -272,7 +272,8 @@ struct tree_common ...@@ -272,7 +272,8 @@ struct tree_common
/* The tree-code says what kind of node it is. /* The tree-code says what kind of node it is.
Codes are defined in tree.def. */ Codes are defined in tree.def. */
#define TREE_CODE(NODE) ((enum tree_code) (NODE)->common.code) #define TREE_CODE(NODE) ((enum tree_code) (NODE)->common.code)
#define TREE_SET_CODE(NODE, VALUE) ((NODE)->common.code = (int) (VALUE)) #define TREE_SET_CODE(NODE, VALUE) \
((NODE)->common.code = (ENUM_BITFIELD(tree_code)) (VALUE))
/* When checking is enabled, errors will be generated if a tree node /* When checking is enabled, errors will be generated if a tree node
is accessed incorrectly. The macros abort with a fatal error. */ is accessed incorrectly. The macros abort with a fatal error. */
......
...@@ -2431,7 +2431,7 @@ const_hash (exp) ...@@ -2431,7 +2431,7 @@ const_hash (exp)
default: default:
/* A language specific constant. Just hash the code. */ /* A language specific constant. Just hash the code. */
return code % MAX_HASH_TABLE; return (int) code % MAX_HASH_TABLE;
} }
/* Compute hashing function */ /* Compute hashing function */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment