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]

[PATCH] Fix ppc bootstrap failure caused by -Wunused-but-set-* warning (PR bootstrap/43681)


Hi!

If neither OUTGOING_REG_PARM_STACK_SPACE nor REG_PARM_STACK_SPACE
macros actually use its arguments, fn is set but not used.
The following patch works around that warning.

Ok for trunk?

2010-04-08  Jakub Jelinek  <jakub@redhat.com>

	PR bootstrap/43681
	* expr.c (block_move_libcall_safe_for_call_parm): Avoid
	set but not used variable warning.

--- gcc/expr.c	2010-04-07 13:39:55.000000000 +0200
+++ gcc/expr.c	2010-04-08 08:57:51.508245623 +0200
@@ -1262,6 +1262,9 @@ block_move_libcall_safe_for_call_parm (v
      an outgoing argument.  */
 #if defined (REG_PARM_STACK_SPACE)
   fn = emit_block_move_libcall_fn (false);
+  /* Avoid set but not used warning if *REG_PARM_STACK_SPACE doesn't
+     depend on its argument.  */
+  (void) fn;
   if (OUTGOING_REG_PARM_STACK_SPACE ((!fn ? NULL_TREE : TREE_TYPE (fn)))
       && REG_PARM_STACK_SPACE (fn) != 0)
     return false;

	Jakub


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