nvptx: Silence unused variable warning in output_constant_pool_contents()
authorJan-Benedict Glaw <jbglaw@lug-owl.de>
Sat, 3 Sep 2022 12:02:57 +0000 (14:02 +0200)
committerJan-Benedict Glaw <jbglaw@lug-owl.de>
Sat, 3 Sep 2022 12:10:27 +0000 (14:10 +0200)
Similar to the rs6000 code, nvptx defines ASM_OUTPUT_DEF_FROM_DECLS as well as
ASM_OUTPUT_DEF. Make sure that the define's parameters are used by referencing
them as (void) to silence a warning in output_constant_pool_contents().

2022-09-30  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

gcc/
* config/nvptx/nvptx.h (ASM_OUTPUT_DEF): Reference macro arguments.

gcc/config/nvptx/nvptx.h

index ed72c25..7129744 100644 (file)
@@ -321,6 +321,9 @@ struct GTY(()) machine_function
 #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)     \
   do                                           \
     {                                          \
+      (void) (FILE);                           \
+      (void) (LABEL1);                         \
+      (void) (LABEL2);                         \
       gcc_unreachable ();                      \
     }                                          \
   while (0)