This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Committed: ATTRIBUTE_UNUSED in noce_emit_cmove / set_reload_reg
- From: Joern Rennecke <amylaar at spamcop dot net>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 04 Nov 2010 11:07:45 -0400
- Subject: Committed: ATTRIBUTE_UNUSED in noce_emit_cmove / set_reload_reg
Three more warnings when building mep-elf were due to missing ATTRIBUTE_UNUSED
markers in ifcvt.c / reload1.c .
In noce_emit_cmove, the variables target and unsignedp are unused if
HAVE_conditional_move is not defined.
In set_reload_reg, regno is 'set but not used' if HARD_REGNO_MODE_OK doesn't
use its first parameter.
bootstrapped on i686-pc-linux-gnu.
Checked in as obvious.
2010-11-04 Joern Rennecke <amylaar@spamcop.net>
PR bootstrap/44756
* ifcvt.c (noce_emit_cmove): Add ATTRIBUTE_UNUSED to target and
unsignedp.
* reload1.c (set_reload_reg): Add ATTRIBUTE_UNUSED to regno.
Index: reload1.c
===================================================================
--- reload1.c (revision 166238)
+++ reload1.c (working copy)
@@ -6025,7 +6025,9 @@ failed_reload (rtx insn, int r)
static int
set_reload_reg (int i, int r)
{
- int regno;
+ /* regno is 'set but not used' if HARD_REGNO_MODE_OK doesn't use its first
+ parameter. */
+ int regno ATTRIBUTE_UNUSED;
rtx reg = spill_reg_rtx[i];
if (reg == 0 || GET_MODE (reg) != rld[r].mode)
Index: ifcvt.c
===================================================================
--- ifcvt.c (revision 166238)
+++ ifcvt.c (working copy)
@@ -1332,8 +1332,8 @@ static rtx
noce_emit_cmove (struct noce_if_info *if_info, rtx x, enum rtx_code code,
rtx cmp_a, rtx cmp_b, rtx vfalse, rtx vtrue)
{
- rtx target;
- int unsignedp;
+ rtx target ATTRIBUTE_UNUSED;
+ int unsignedp ATTRIBUTE_UNUSED;
/* If earliest == jump, try to build the cmove insn directly.
This is helpful when combine has created some complex condition