This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]