This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix -Wunused warning in regrename.c (PR middle-end/46844)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 8 Dec 2010 17:45:51 +0100
- Subject: [committed] Fix -Wunused warning in regrename.c (PR middle-end/46844)
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
REG argument is only used if one of the target macros is defined,
so on some targets we warn that reg is unused. Fixed thusly,
bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk.
2010-12-08 Jakub Jelinek <jakub@redhat.com>
PR middle-end/46844
* regrename.c (check_new_reg_p): Add ATTRIBUTE_UNUSED to reg
parameter.
--- gcc/regrename.c.jj 2010-12-07 17:32:49.000000000 +0100
+++ gcc/regrename.c 2010-12-08 13:21:24.000000000 +0100
@@ -309,8 +309,8 @@ sort_du_head (struct du_head **head)
registers. */
static bool
-check_new_reg_p (int reg, int new_reg, struct du_head *this_head,
- HARD_REG_SET this_unavailable)
+check_new_reg_p (int reg ATTRIBUTE_UNUSED, int new_reg,
+ struct du_head *this_head, HARD_REG_SET this_unavailable)
{
enum machine_mode mode = GET_MODE (*this_head->first->loc);
int nregs = hard_regno_nregs[new_reg][mode];
Jakub