This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix ppc bootstrap failure caused by -Wunused-but-set-* warning (PR bootstrap/43681)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 8 Apr 2010 11:30:54 +0200
- Subject: [PATCH] Fix ppc bootstrap failure caused by -Wunused-but-set-* warning (PR bootstrap/43681)
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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