Hello, this patch fixes some potential warnings for C++ bootstrap. I noticed them while working on the delayed folding for C++-FE on boostrap.
ChangeLog 2014-11-14 Kai Tietz <kti...@redhat.com> * dwarf2out.c(output_loc_operands): Make sure that comparison is done on same sign. * varasm.c (default_assemble_integer): Likewise. * optabs.c (expand_subword_shift): Likewise. (expand_doubleword_shift): Likewise. (expand_binop): Likewise. * tree-complex.c (create_one_component_var): Fix pontential sequence-point issue. Regression tested on x86_64-unknown-linux-gnu. Ok for apply? Regards, Kai Index: dwarf2out.c =================================================================== --- dwarf2out.c (Revision 217468) +++ dwarf2out.c (Arbeitskopie) @@ -1874,7 +1874,8 @@ output_loc_operands (dw_loc_descr_ref loc, int for } break; case dw_val_class_addr: - gcc_assert (val1->v.val_unsigned == DWARF2_ADDR_SIZE); + gcc_assert (val1->v.val_unsigned + == (unsigned HOST_WIDE_INT) DWARF2_ADDR_SIZE); dw2_asm_output_addr_rtx (DWARF2_ADDR_SIZE, val2->v.val_addr, NULL); break; default: Index: optabs.c =================================================================== --- optabs.c (Revision 217468) +++ optabs.c (Arbeitskopie) @@ -902,7 +902,7 @@ expand_subword_shift (machine_mode op1_mode, optab are truncated to the mode size. */ carries = expand_binop (word_mode, reverse_unsigned_shift, outof_input, const1_rtx, 0, unsignedp, methods); - if (shift_mask == BITS_PER_WORD - 1) + if (shift_mask == (unsigned HOST_WIDE_INT) (BITS_PER_WORD - 1)) { tmp = immed_wide_int_const (wi::minus_one (GET_MODE_PRECISION (op1_mode)), op1_mode); @@ -1075,7 +1075,8 @@ expand_doubleword_shift (machine_mode op1_mode, op Set SUPERWORD_OP1 to the shift count that should be used to shift OUTOF_INPUT into INTO_TARGET when the condition is false. */ tmp = immed_wide_int_const (wi::shwi (BITS_PER_WORD, op1_mode), op1_mode); - if (!CONSTANT_P (op1) && shift_mask == BITS_PER_WORD - 1) + if (!CONSTANT_P (op1) + && shift_mask == (unsigned HOST_WIDE_INT) (BITS_PER_WORD - 1)) { /* Set CMP1 to OP1 & BITS_PER_WORD. The result is zero iff OP1 is a subword shift count. */ @@ -1818,8 +1819,9 @@ expand_binop (machine_mode mode, optab binoptab, r /* Make sure that this is a combination that expand_doubleword_shift can handle. See the comments there for details. */ if (double_shift_mask == 0 - || (shift_mask == BITS_PER_WORD - 1 - && double_shift_mask == BITS_PER_WORD * 2 - 1)) + || (shift_mask == (unsigned HOST_WIDE_INT) (BITS_PER_WORD - 1) + && double_shift_mask + == (unsigned HOST_WIDE_INT) (BITS_PER_WORD * 2 - 1))) { rtx_insn *insns; rtx into_target, outof_target; Index: tree-complex.c =================================================================== --- tree-complex.c (Revision 217468) +++ tree-complex.c (Arbeitskopie) @@ -452,7 +452,8 @@ create_one_component_var (tree type, tree orig, co { const char *name = IDENTIFIER_POINTER (DECL_NAME (orig)); - DECL_NAME (r) = get_identifier (ACONCAT ((name, suffix, NULL))); + name = ACONCAT ((name, suffix, NULL)); + DECL_NAME (r) = get_identifier (name); SET_DECL_DEBUG_EXPR (r, build1 (code, type, orig)); DECL_HAS_DEBUG_EXPR_P (r) = 1; Index: varasm.c =================================================================== --- varasm.c (Revision 217468) +++ varasm.c (Arbeitskopie) @@ -2688,7 +2688,7 @@ default_assemble_integer (rtx x ATTRIBUTE_UNUSED, const char *op = integer_asm_op (size, aligned_p); /* Avoid GAS bugs for large values. Specifically negative values whose absolute value fits in a bfd_vma, but not in a bfd_signed_vma. */ - if (size > UNITS_PER_WORD && size > POINTER_SIZE_UNITS) + if (size > UNITS_PER_WORD && size > (unsigned int) POINTER_SIZE_UNITS) return false; return op && (assemble_integer_with_op (op, x), true); }