Commit bb93b973 by Richard Kenner Committed by Richard Kenner

diagnostic.c (warn_deprecated_use): Rework to lower indentation.

	* diagnostic.c (warn_deprecated_use): Rework to lower indentation.
	* expr.c (emit_move_insn_1): Remove warning, use HOST_WIDE_INT for
	offsets, and change line folding.
	* optabs.c (expand_binop): Remove warnings.
	* sdbout.c (sdbout_record_type_name): Constify NAME to avoid warning.

From-SVN: r48801
parent 6a0b0c1b
Sat Jan 12 08:54:51 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* diagnostic.c (warn_deprecated_use): Rework to lower indentation.
* expr.c (emit_move_insn_1): Remove warning, use HOST_WIDE_INT for
offsets, and change line folding.
* optabs.c (expand_binop): Remove warnings.
* sdbout.c (sdbout_record_type_name): Constify NAME to avoid warning.
2002-01-12 Graham Stott <grahams@redhat.com> 2002-01-12 Graham Stott <grahams@redhat.com>
* attribs.c (handle_deprecated_attribute): constify WHAT. * attribs.c (handle_deprecated_attribute): constify WHAT.
......
...@@ -1525,41 +1525,36 @@ void ...@@ -1525,41 +1525,36 @@ void
warn_deprecated_use (node) warn_deprecated_use (node)
tree node; tree node;
{ {
if (node && warn_deprecated_decl) if (node == 0 || !warn_deprecated_decl)
return;
if (DECL_P (node))
warning ("`%s' is deprecated (declared at %s:%d)",
IDENTIFIER_POINTER (DECL_NAME (node)),
DECL_SOURCE_FILE (node), DECL_SOURCE_LINE (node));
else if (TYPE_P (node))
{ {
if (DECL_P (node)) const char *what = NULL;
{ tree decl = TYPE_STUB_DECL (node);
warning ("`%s' is deprecated (declared at %s:%d)",
IDENTIFIER_POINTER (DECL_NAME (node)), if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE)
DECL_SOURCE_FILE (node), DECL_SOURCE_LINE (node)); what = IDENTIFIER_POINTER (TYPE_NAME (node));
} else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL
else if (TYPE_P (node)) && DECL_NAME (TYPE_NAME (node)))
{ what = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (node)));
const char *what = NULL;
tree decl = TYPE_STUB_DECL (node);
if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE)
what = IDENTIFIER_POINTER (TYPE_NAME (node));
else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL
&& DECL_NAME (TYPE_NAME (node)))
what = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (node)));
if (what) if (what)
{ {
if (decl) if (decl)
warning ("`%s' is deprecated (declared at %s:%d)", what, warning ("`%s' is deprecated (declared at %s:%d)", what,
DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl)); DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl));
else
warning ("`%s' is deprecated", what);
}
else else
{ warning ("`%s' is deprecated", what);
if (decl) }
warning ("type is deprecated (declared at %s:%d)", else if (decl)
DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl)); warning ("type is deprecated (declared at %s:%d)",
else DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl));
warning ("type is deprecated"); else
} warning ("type is deprecated");
}
} }
} }
...@@ -2791,7 +2791,6 @@ emit_move_insn_1 (x, y) ...@@ -2791,7 +2791,6 @@ emit_move_insn_1 (x, y)
enum machine_mode mode = GET_MODE (x); enum machine_mode mode = GET_MODE (x);
enum machine_mode submode; enum machine_mode submode;
enum mode_class class = GET_MODE_CLASS (mode); enum mode_class class = GET_MODE_CLASS (mode);
unsigned int i;
if ((unsigned int) mode >= (unsigned int) MAX_MACHINE_MODE) if ((unsigned int) mode >= (unsigned int) MAX_MACHINE_MODE)
abort (); abort ();
...@@ -2817,10 +2816,11 @@ emit_move_insn_1 (x, y) ...@@ -2817,10 +2816,11 @@ emit_move_insn_1 (x, y)
/* In case we output to the stack, but the size is smaller machine can /* In case we output to the stack, but the size is smaller machine can
push exactly, we need to use move instructions. */ push exactly, we need to use move instructions. */
if (stack if (stack
&& PUSH_ROUNDING (GET_MODE_SIZE (submode)) != GET_MODE_SIZE (submode)) && (PUSH_ROUNDING (GET_MODE_SIZE (submode))
!= GET_MODE_SIZE (submode)))
{ {
rtx temp; rtx temp;
int offset1, offset2; HOST_WIDE_INT offset1, offset2;
/* Do not use anti_adjust_stack, since we don't want to update /* Do not use anti_adjust_stack, since we don't want to update
stack_pointer_delta. */ stack_pointer_delta. */
...@@ -2832,12 +2832,13 @@ emit_move_insn_1 (x, y) ...@@ -2832,12 +2832,13 @@ emit_move_insn_1 (x, y)
#endif #endif
stack_pointer_rtx, stack_pointer_rtx,
GEN_INT GEN_INT
(PUSH_ROUNDING (GET_MODE_SIZE (GET_MODE (x)))), (PUSH_ROUNDING
stack_pointer_rtx, (GET_MODE_SIZE (GET_MODE (x)))),
0, stack_pointer_rtx, 0, OPTAB_LIB_WIDEN);
OPTAB_LIB_WIDEN);
if (temp != stack_pointer_rtx) if (temp != stack_pointer_rtx)
emit_move_insn (stack_pointer_rtx, temp); emit_move_insn (stack_pointer_rtx, temp);
#ifdef STACK_GROWS_DOWNWARD #ifdef STACK_GROWS_DOWNWARD
offset1 = 0; offset1 = 0;
offset2 = GET_MODE_SIZE (submode); offset2 = GET_MODE_SIZE (submode);
...@@ -2846,6 +2847,7 @@ emit_move_insn_1 (x, y) ...@@ -2846,6 +2847,7 @@ emit_move_insn_1 (x, y)
offset2 = (-PUSH_ROUNDING (GET_MODE_SIZE (GET_MODE (x))) offset2 = (-PUSH_ROUNDING (GET_MODE_SIZE (GET_MODE (x)))
+ GET_MODE_SIZE (submode)); + GET_MODE_SIZE (submode));
#endif #endif
emit_move_insn (change_address (x, submode, emit_move_insn (change_address (x, submode,
gen_rtx_PLUS (Pmode, gen_rtx_PLUS (Pmode,
stack_pointer_rtx, stack_pointer_rtx,
...@@ -2901,8 +2903,10 @@ emit_move_insn_1 (x, y) ...@@ -2901,8 +2903,10 @@ emit_move_insn_1 (x, y)
if (GET_MODE_BITSIZE (mode) < 2 * BITS_PER_WORD if (GET_MODE_BITSIZE (mode) < 2 * BITS_PER_WORD
&& (reload_in_progress | reload_completed) == 0) && (reload_in_progress | reload_completed) == 0)
{ {
int packed_dest_p = (REG_P (x) && REGNO (x) < FIRST_PSEUDO_REGISTER); int packed_dest_p
int packed_src_p = (REG_P (y) && REGNO (y) < FIRST_PSEUDO_REGISTER); = (REG_P (x) && REGNO (x) < FIRST_PSEUDO_REGISTER);
int packed_src_p
= (REG_P (y) && REGNO (y) < FIRST_PSEUDO_REGISTER);
if (packed_dest_p || packed_src_p) if (packed_dest_p || packed_src_p)
{ {
...@@ -2924,12 +2928,14 @@ emit_move_insn_1 (x, y) ...@@ -2924,12 +2928,14 @@ emit_move_insn_1 (x, y)
if (packed_dest_p) if (packed_dest_p)
{ {
rtx sreg = gen_rtx_SUBREG (reg_mode, x, 0); rtx sreg = gen_rtx_SUBREG (reg_mode, x, 0);
emit_move_insn_1 (cmem, y); emit_move_insn_1 (cmem, y);
return emit_move_insn_1 (sreg, mem); return emit_move_insn_1 (sreg, mem);
} }
else else
{ {
rtx sreg = gen_rtx_SUBREG (reg_mode, y, 0); rtx sreg = gen_rtx_SUBREG (reg_mode, y, 0);
emit_move_insn_1 (mem, sreg); emit_move_insn_1 (mem, sreg);
return emit_move_insn_1 (x, cmem); return emit_move_insn_1 (x, cmem);
} }
...@@ -2950,9 +2956,7 @@ emit_move_insn_1 (x, y) ...@@ -2950,9 +2956,7 @@ emit_move_insn_1 (x, y)
&& ! (reload_in_progress || reload_completed) && ! (reload_in_progress || reload_completed)
&& (GET_CODE (realpart_x) == SUBREG && (GET_CODE (realpart_x) == SUBREG
|| GET_CODE (imagpart_x) == SUBREG)) || GET_CODE (imagpart_x) == SUBREG))
{ emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
}
emit_insn (GEN_FCN (mov_optab->handlers[(int) submode].insn_code) emit_insn (GEN_FCN (mov_optab->handlers[(int) submode].insn_code)
(realpart_x, realpart_y)); (realpart_x, realpart_y));
...@@ -2971,6 +2975,7 @@ emit_move_insn_1 (x, y) ...@@ -2971,6 +2975,7 @@ emit_move_insn_1 (x, y)
rtx last_insn = 0; rtx last_insn = 0;
rtx seq, inner; rtx seq, inner;
int need_clobber; int need_clobber;
int i;
#ifdef PUSH_ROUNDING #ifdef PUSH_ROUNDING
...@@ -2991,19 +2996,20 @@ emit_move_insn_1 (x, y) ...@@ -2991,19 +2996,20 @@ emit_move_insn_1 (x, y)
#endif #endif
stack_pointer_rtx, stack_pointer_rtx,
GEN_INT GEN_INT
(PUSH_ROUNDING (GET_MODE_SIZE (GET_MODE (x)))), (PUSH_ROUNDING
stack_pointer_rtx, (GET_MODE_SIZE (GET_MODE (x)))),
0, stack_pointer_rtx, 0,& OPTAB_LIB_WIDEN);
OPTAB_LIB_WIDEN);
if (temp != stack_pointer_rtx) if (temp != stack_pointer_rtx)
emit_move_insn (stack_pointer_rtx, temp); emit_move_insn (stack_pointer_rtx, temp);
code = GET_CODE (XEXP (x, 0)); code = GET_CODE (XEXP (x, 0));
/* Just hope that small offsets off SP are OK. */ /* Just hope that small offsets off SP are OK. */
if (code == POST_INC) if (code == POST_INC)
temp = gen_rtx_PLUS (Pmode, stack_pointer_rtx, temp = gen_rtx_PLUS (Pmode, stack_pointer_rtx,
GEN_INT (-(HOST_WIDE_INT) GEN_INT (-((HOST_WIDE_INT)
GET_MODE_SIZE (GET_MODE (x)))); GET_MODE_SIZE (GET_MODE (x)))));
else if (code == POST_DEC) else if (code == POST_DEC)
temp = gen_rtx_PLUS (Pmode, stack_pointer_rtx, temp = gen_rtx_PLUS (Pmode, stack_pointer_rtx,
GEN_INT (GET_MODE_SIZE (GET_MODE (x)))); GEN_INT (GET_MODE_SIZE (GET_MODE (x))));
...@@ -3062,9 +3068,7 @@ emit_move_insn_1 (x, y) ...@@ -3062,9 +3068,7 @@ emit_move_insn_1 (x, y)
if (x != y if (x != y
&& ! (reload_in_progress || reload_completed) && ! (reload_in_progress || reload_completed)
&& need_clobber != 0) && need_clobber != 0)
{ emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
}
emit_insn (seq); emit_insn (seq);
......
...@@ -895,7 +895,7 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods) ...@@ -895,7 +895,7 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
&& GET_MODE_SIZE (mode) > UNITS_PER_WORD && GET_MODE_SIZE (mode) > UNITS_PER_WORD
&& binoptab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing) && binoptab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing)
{ {
unsigned int i; int i;
rtx insns; rtx insns;
rtx equiv_value; rtx equiv_value;
...@@ -1186,7 +1186,7 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods) ...@@ -1186,7 +1186,7 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
&& GET_MODE_SIZE (mode) >= 2 * UNITS_PER_WORD && GET_MODE_SIZE (mode) >= 2 * UNITS_PER_WORD
&& binoptab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing) && binoptab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing)
{ {
unsigned int i; int i;
optab otheroptab = binoptab == add_optab ? sub_optab : add_optab; optab otheroptab = binoptab == add_optab ? sub_optab : add_optab;
unsigned int nwords = GET_MODE_BITSIZE (mode) / BITS_PER_WORD; unsigned int nwords = GET_MODE_BITSIZE (mode) / BITS_PER_WORD;
rtx carry_in = NULL_RTX, carry_out = NULL_RTX; rtx carry_in = NULL_RTX, carry_out = NULL_RTX;
...@@ -2176,7 +2176,7 @@ expand_unop (mode, unoptab, op0, target, unsignedp) ...@@ -2176,7 +2176,7 @@ expand_unop (mode, unoptab, op0, target, unsignedp)
&& GET_MODE_SIZE (mode) > UNITS_PER_WORD && GET_MODE_SIZE (mode) > UNITS_PER_WORD
&& unoptab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing) && unoptab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing)
{ {
unsigned int i; int i;
rtx insns; rtx insns;
if (target == 0 || target == op0) if (target == 0 || target == op0)
...@@ -2191,6 +2191,7 @@ expand_unop (mode, unoptab, op0, target, unsignedp) ...@@ -2191,6 +2191,7 @@ expand_unop (mode, unoptab, op0, target, unsignedp)
rtx x = expand_unop (word_mode, unoptab, rtx x = expand_unop (word_mode, unoptab,
operand_subword_force (op0, i, mode), operand_subword_force (op0, i, mode),
target_piece, unsignedp); target_piece, unsignedp);
if (target_piece != x) if (target_piece != x)
emit_move_insn (target_piece, x); emit_move_insn (target_piece, x);
} }
......
...@@ -440,7 +440,7 @@ static void ...@@ -440,7 +440,7 @@ static void
sdbout_record_type_name (type) sdbout_record_type_name (type)
tree type; tree type;
{ {
char *name = 0; const char *name = 0;
int no_name; int no_name;
if (KNOWN_TYPE_TAG (type)) if (KNOWN_TYPE_TAG (type))
...@@ -449,6 +449,7 @@ sdbout_record_type_name (type) ...@@ -449,6 +449,7 @@ sdbout_record_type_name (type)
if (TYPE_NAME (type) != 0) if (TYPE_NAME (type) != 0)
{ {
tree t = 0; tree t = 0;
/* Find the IDENTIFIER_NODE for the type name. */ /* Find the IDENTIFIER_NODE for the type name. */
if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE)
t = TYPE_NAME (type); t = TYPE_NAME (type);
......
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