* alias.c (record_alias_subset): Remove ignored `&'.
(init_alias_once): Likewise.
* c-lex.c (UNGETC): Cast first argument of comma expression to void.
* config/mips/mips.c (mips_asm_file_end): Cast the result of
fwrite to `int' when comparing against one.
* config/mips/mips.h (CAN_ELIMINATE): Add parens around && within ||.
(INITIAL_ELIMINATION_OFFSET): Add braces to avoid ambiguous `else'.
* cse.c (rehash_using_reg): Change type of variable `i' to
unsigned int.
* dwarf2out.c (initial_return_save): Cast -1 to unsigned before
assigning it to one.
* except.c (duplicate_eh_handlers): Remove unused variable `tmp'.
* final.c (final_scan_insn): Likewise for variable `i'.
(output_asm_insn): Cast a char to unsigned char when used as an
array index.
* gcse.c (compute_pre_ppinout): Cast -1 to SBITMAP_ELT_TYPE when
assigning it to one.
* loop.c (strength_reduce): Remove unused variables `count' and `temp'.
* recog.c (preprocess_constraints): Cast a char to unsigned char
when used as an array index.
* regmove.c (find_matches): Likewise.
* reload1.c (calculate_needs): Add default case in switch.
(eliminate_regs_in_insn): Initialize variable `offset'.
(set_offsets_for_label): Change type of variable `i' to unsigned.
(reload_as_needed): Wrap variable `i' in macro check on
AUTO_INC_DEC || INSN_CLOBBERS_REGNO_P.
* scan-decls.c (scan_decls): Mark parameters `argc' and `argv'
with ATTRIBUTE_UNUSED. Cast variable `start_written' to size_t
when comparing against one.
* stor-layout.c (layout_decl): Cast maximum_field_alignment to
unsigned when comparing against one. Likewise for
GET_MODE_ALIGNMENT().
(layout_record): Cast record_align to int when comparing against a
signed value.
(layout_type): Cast TYPE_ALIGN() to int when comparing against a
signed value.
* tree.c (get_identifier): Cast variable `len' to unsigned when
comparing against one.
(maybe_get_identifier): Likewise
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24403
138bc75d-0d04-0410-961f-
82ee72b054a4
+Wed Dec 23 09:51:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * alias.c (record_alias_subset): Remove ignored `&'.
+ (init_alias_once): Likewise.
+
+ * c-lex.c (UNGETC): Cast first argument of comma expression to void.
+
+ * config/mips/mips.c (mips_asm_file_end): Cast the result of
+ fwrite to `int' when comparing against one.
+
+ * config/mips/mips.h (CAN_ELIMINATE): Add parens around && within ||.
+ (INITIAL_ELIMINATION_OFFSET): Add braces to avoid ambiguous `else'.
+
+ * cse.c (rehash_using_reg): Change type of variable `i' to
+ unsigned int.
+
+ * dwarf2out.c (initial_return_save): Cast -1 to unsigned before
+ assigning it to one.
+
+ * except.c (duplicate_eh_handlers): Remove unused variable `tmp'.
+
+ * final.c (final_scan_insn): Likewise for variable `i'.
+ (output_asm_insn): Cast a char to unsigned char when used as an
+ array index.
+
+ * gcse.c (compute_pre_ppinout): Cast -1 to SBITMAP_ELT_TYPE when
+ assigning it to one.
+
+ * loop.c (strength_reduce): Remove unused variables `count' and `temp'.
+
+ * recog.c (preprocess_constraints): Cast a char to unsigned char
+ when used as an array index.
+
+ * regmove.c (find_matches): Likewise.
+
+ * reload1.c (calculate_needs): Add default case in switch.
+ (eliminate_regs_in_insn): Initialize variable `offset'.
+ (set_offsets_for_label): Change type of variable `i' to unsigned.
+ (reload_as_needed): Wrap variable `i' in macro check on
+ AUTO_INC_DEC || INSN_CLOBBERS_REGNO_P.
+
+ * scan-decls.c (scan_decls): Mark parameters `argc' and `argv'
+ with ATTRIBUTE_UNUSED. Cast variable `start_written' to size_t
+ when comparing against one.
+
+ * stor-layout.c (layout_decl): Cast maximum_field_alignment to
+ unsigned when comparing against one. Likewise for
+ GET_MODE_ALIGNMENT().
+ (layout_record): Cast record_align to int when comparing against a
+ signed value.
+ (layout_type): Cast TYPE_ALIGN() to int when comparing against a
+ signed value.
+
+ * tree.c (get_identifier): Cast variable `len' to unsigned when
+ comparing against one.
+ (maybe_get_identifier): Likewise
+
Wed Dec 23 00:10:01 1998 Jeffrey A Law (law@cygnus.com)
* toplev.c (rest_of_compilation): Do not set reload_completed.
(alias_set_entry) xmalloc (sizeof (struct alias_set_entry));
superset_entry->alias_set = superset;
superset_entry->children
- = splay_tree_new (&alias_set_compare, 0, 0);
+ = splay_tree_new (alias_set_compare, 0, 0);
splay_tree_insert (alias_sets,
(splay_tree_key) superset,
(splay_tree_value) superset_entry);
/* There is an entry for the subset. Enter all of its children
(if they are not already present) as children of the SUPERSET. */
splay_tree_foreach (subset_entry->children,
- &insert_subset_children,
+ insert_subset_children,
superset_entry->children);
/* Enter the SUBSET itself as a child of the SUPERSET. */
&& HARD_REGNO_MODE_OK (i, Pmode))
SET_HARD_REG_BIT (argument_registers, i);
- alias_sets = splay_tree_new (&alias_set_compare, 0, 0);
+ alias_sets = splay_tree_new (alias_set_compare, 0, 0);
}
void
extern int yy_get_token ();
#define GETC() (yy_cur < yy_lim ? *yy_cur++ : yy_get_token ())
-#define UNGETC(c) ((c), yy_cur--)
+#define UNGETC(c) ((void)(c), yy_cur--)
#else
#define GETC() getc (finput)
#define UNGETC(c) ungetc (c, finput)
fatal_io_error (temp_filename);
while ((len = fread (buffer, 1, sizeof (buffer), asm_out_text_file)) > 0)
- if (fwrite (buffer, 1, len, file) != len)
+ if ((int) fwrite (buffer, 1, len, file) != len)
pfatal_with_name (asm_file_name);
if (len < 0)
#define CAN_ELIMINATE(FROM, TO) \
(((FROM) == RETURN_ADDRESS_POINTER_REGNUM && (! leaf_function_p () \
- || TO == GP_REG_FIRST + 31 && leaf_function_p)) \
+ || (TO == GP_REG_FIRST + 31 && leaf_function_p))) \
|| ((FROM) != RETURN_ADDRESS_POINTER_REGNUM \
&& ((TO) == HARD_FRAME_POINTER_REGNUM \
|| ((TO) == STACK_POINTER_REGNUM && ! frame_pointer_needed \
/* Some ABIs store 64 bits to the stack, but Pmode is 32 bits, \
so we must add 4 bytes to the offset to get the right value. */ \
else if ((FROM) == RETURN_ADDRESS_POINTER_REGNUM) \
+ { \
if (leaf_function_p ()) \
(OFFSET) = 0; \
else (OFFSET) = current_frame_info.gp_sp_offset \
+ ((UNITS_PER_WORD - (POINTER_SIZE / BITS_PER_UNIT)) \
* (BYTES_BIG_ENDIAN != 0)); \
+ } \
}
/* If we generate an insn to push BYTES bytes,
rehash_using_reg (x)
rtx x;
{
- int i;
+ unsigned int i;
struct table_elt *p, *next;
unsigned hash;
initial_return_save (rtl)
register rtx rtl;
{
- unsigned reg = -1;
+ unsigned int reg = (unsigned int) -1;
long offset = 0;
switch (GET_CODE (rtl))
{
struct handler_info *ptr, *new_ptr;
int new_region, region;
- rtx tmp;
region = find_func_region (old_note_eh_region);
if (region == -1)
int prescan;
int nopeepholes;
{
- register int i;
#ifdef HAVE_cc0
rtx set;
#endif
punctuation character alone, with no operand.
The PRINT_OPERAND macro decides what is actually done. */
#ifdef PRINT_OPERAND_PUNCT_VALID_P
- else if (PRINT_OPERAND_PUNCT_VALID_P (*p))
+ else if (PRINT_OPERAND_PUNCT_VALID_P ((unsigned char)*p))
output_operand (NULL_RTX, *p++);
#endif
else
{
int_list_ptr pred;
SBITMAP_ELT_TYPE tmp = *antin & *pavin & (*antloc | (*transp & *ppout));
- SBITMAP_ELT_TYPE pred_val = -1L;
+ SBITMAP_ELT_TYPE pred_val = (SBITMAP_ELT_TYPE) -1;
for (pred = s_preds[bb]; pred != NULL; pred = pred->next)
{
&add_val, &mult_val,
&last_consec_insn))))
{
- int count;
struct induction *v
= (struct induction *) alloca (sizeof (struct induction));
- rtx temp;
/* If this is a library call, increase benefit. */
if (find_reg_note (p, REG_RETVAL, NULL_RTX))
break;
default:
- op_alt[j].class = reg_class_subunion[(int) op_alt[j].class][(int) REG_CLASS_FROM_LETTER (c)];
+ op_alt[j].class = reg_class_subunion[(int) op_alt[j].class][(int) REG_CLASS_FROM_LETTER ((unsigned char)c)];
break;
}
}
case 'j': case 'k': case 'l': case 'p': case 'q': case 't': case 'u':
case 'v': case 'w': case 'x': case 'y': case 'z': case 'A': case 'B':
case 'C': case 'D': case 'W': case 'Y': case 'Z':
- if (CLASS_LIKELY_SPILLED_P (REG_CLASS_FROM_LETTER (c)))
+ if (CLASS_LIKELY_SPILLED_P (REG_CLASS_FROM_LETTER ((unsigned char)c)))
likely_spilled[op_no] = 1;
break;
}
case RELOAD_FOR_OPADDR_ADDR:
this_needs = &insn_needs.op_addr_reload;
break;
+ default:
+ abort();
}
if (size > 1)
&& ep->to == HARD_FRAME_POINTER_REGNUM)
{
rtx src = SET_SRC (old_set);
- int offset, ok = 0;
+ int offset = 0, ok = 0;
rtx prev_insn, prev_set;
if (src == ep->to_rtx)
set_offsets_for_label (insn)
rtx insn;
{
- int i;
+ unsigned int i;
int label_nr = CODE_LABEL_NUMBER (insn);
struct elim_table *ep;
int live_known;
{
struct insn_chain *chain;
+#if defined (AUTO_INC_DEC) || defined (INSN_CLOBBERS_REGNO_P)
register int i;
+#endif
rtx x;
bzero ((char *) spill_reg_rtx, sizeof spill_reg_rtx);
int
scan_decls (pfile, argc, argv)
cpp_reader *pfile;
- int argc;
- char **argv;
+ int argc ATTRIBUTE_UNUSED;
+ char **argv ATTRIBUTE_UNUSED;
{
int saw_extern, saw_inline;
int start_written;
}
break;
case CPP_OTHER:
- if (CPP_WRITTEN (pfile) == start_written + 1
+ if (CPP_WRITTEN (pfile) == (size_t) start_written + 1
&& (CPP_PWRITTEN (pfile)[-1] == '*'
|| CPP_PWRITTEN (pfile)[-1] == '&'))
declarator_start = start_written;
{
DECL_BIT_FIELD_TYPE (decl) = DECL_BIT_FIELD (decl) ? type : 0;
if (maximum_field_alignment != 0)
- DECL_ALIGN (decl) = MIN (DECL_ALIGN (decl), maximum_field_alignment);
+ DECL_ALIGN (decl) = MIN (DECL_ALIGN (decl),
+ (unsigned)maximum_field_alignment);
else if (DECL_PACKED (decl))
DECL_ALIGN (decl) = MIN (DECL_ALIGN (decl), BITS_PER_UNIT);
}
if (xmode != BLKmode
&& known_align % GET_MODE_ALIGNMENT (xmode) == 0)
{
- DECL_ALIGN (decl) = MAX (GET_MODE_ALIGNMENT (xmode),
+ DECL_ALIGN (decl) = MAX ((unsigned) GET_MODE_ALIGNMENT (xmode),
DECL_ALIGN (decl));
DECL_MODE (decl) = xmode;
DECL_SIZE (decl) = size_int (GET_MODE_BITSIZE (xmode));
It does, however, affect the alignment of the next field
within the structure. */
if (! integer_zerop (DECL_SIZE (field)))
- record_align = MAX (record_align, desired_align);
+ record_align = MAX ((int)record_align, desired_align);
else if (! DECL_PACKED (field))
desired_align = TYPE_ALIGN (TREE_TYPE (field));
/* A named bit field of declared type `int'
else if (DECL_PACKED (field))
type_align = MIN (type_align, BITS_PER_UNIT);
- record_align = MAX (record_align, type_align);
+ record_align = MAX ((int)record_align, type_align);
}
}
else
- record_align = MAX (record_align, desired_align);
+ record_align = MAX ((int)record_align, desired_align);
#endif
/* Does this field automatically have alignment it needs
MODE_INT, 1);
if (STRICT_ALIGNMENT && TYPE_ALIGN (type) < BIGGEST_ALIGNMENT
- && TYPE_ALIGN (type) < TREE_INT_CST_LOW (TYPE_SIZE (type))
+ && (int)TYPE_ALIGN (type) < TREE_INT_CST_LOW (TYPE_SIZE (type))
&& TYPE_MODE (type) != BLKmode)
{
TYPE_NO_FORCE_BLK (type) = 1;
then stick with BLKmode. */
if (STRICT_ALIGNMENT
&& ! (TYPE_ALIGN (type) >= BIGGEST_ALIGNMENT
- || (TYPE_ALIGN (type)
+ || ((int)TYPE_ALIGN (type)
>= TREE_INT_CST_LOW (TYPE_SIZE (type)))))
{
if (TYPE_MODE (type) != BLKmode)
then stick with BLKmode. */
&& (! STRICT_ALIGNMENT
|| TYPE_ALIGN (type) >= BIGGEST_ALIGNMENT
- || TYPE_ALIGN (type) >= TREE_INT_CST_LOW (TYPE_SIZE (type))))
+ || (int)TYPE_ALIGN (type) >= TREE_INT_CST_LOW (TYPE_SIZE (type))))
{
tree field;
/* A union which has any BLKmode members must itself be BLKmode;
/* Decide how much of that length to hash on */
hash_len = len;
- if (warn_id_clash && len > id_clash_len)
+ if (warn_id_clash && (unsigned)len > id_clash_len)
hash_len = id_clash_len;
/* Compute hash code */
return idp; /* <-- return if found */
/* Not found; optionally warn about a similar identifier */
- if (warn_id_clash && do_identifier_warnings && len >= id_clash_len)
+ if (warn_id_clash && do_identifier_warnings && (unsigned)len >= id_clash_len)
for (idp = hash_table[hi]; idp; idp = TREE_CHAIN (idp))
if (!strncmp (IDENTIFIER_POINTER (idp), text, id_clash_len))
{
/* Decide how much of that length to hash on */
hash_len = len;
- if (warn_id_clash && len > id_clash_len)
+ if (warn_id_clash && (unsigned)len > id_clash_len)
hash_len = id_clash_len;
/* Compute hash code */