diff mbox

[committed] Fix -Wunused warning in regrename.c (PR middle-end/46844)

Message ID 20101208164550.GG29412@tyan-ft48-01.lab.bos.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek Dec. 8, 2010, 4:45 p.m. UTC
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.


	Jakub
diff mbox

Patch

--- 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];