Patchwork [committed] Avoid optabs.c warning

login
register
mail settings
Submitter Richard Sandiford
Date Jan. 24, 2012, 7:50 p.m.
Message ID <87liow6fs3.fsf@firetop.home>
Download mbox | patch
Permalink /patch/137627/
State New
Headers show

Comments

Richard Sandiford - Jan. 24, 2012, 7:50 p.m.
If the target doesn't have an atomic_test_and_set pattern, we'd warn
about "mode" being unused.

Tested on mips64-linux-gnu and applied as obvious.

Richard


gcc/
	* optabs.c (gen_atomic_test_and_set): Use each argument.

Patch

Index: gcc/optabs.c
===================================================================
--- gcc/optabs.c	2012-01-24 19:48:11.000000000 +0000
+++ gcc/optabs.c	2012-01-24 19:48:11.000000000 +0000
@@ -7311,7 +7311,8 @@  maybe_emit_compare_and_swap_exchange_loo
 #ifndef HAVE_atomic_test_and_set
 #define HAVE_atomic_test_and_set 0
 #define CODE_FOR_atomic_test_and_set CODE_FOR_nothing
-#define gen_atomic_test_and_set(x,y,z)  (gcc_unreachable (), NULL_RTX)
+#define gen_atomic_test_and_set(x,y,z) \
+  (gcc_unreachable (), (void) (0 && (x) && (y) && (z)), NULL_RTX)
 #endif
 
 static rtx