]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
nvptx: Silence unused variable warning in output_constant_pool_contents()
authorJan-Benedict Glaw <jbglaw@lug-owl.de>
Mon, 5 Sep 2022 07:40:30 +0000 (09:40 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 5 Sep 2022 07:40:30 +0000 (09:40 +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.

(cherry picked from commit 08de065293f8b08158e1089fbacce9dbaba95077)

gcc/ChangeLog.omp
gcc/config/nvptx/nvptx.h

index 08177cdd444420c5ae60f1b08eefd831c9eeae85..47babd06e6371d374f5de2e4aa7f44c6b19d8f5f 100644 (file)
@@ -1,3 +1,10 @@
+2022-09-05  Tobias Burnus  <tobias@codesourcery.com>
+
+       Backport from mainline:
+       2022-09-30  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
+
+       * config/nvptx/nvptx.h (ASM_OUTPUT_DEF): Reference macro arguments.
+
 2022-09-05  Tobias Burnus  <tobias@codesourcery.com>
 
        Backport from mainline:
index ed72c253191a5bfafbc599d1e548d7f1291d8452..712974405668e69c57c5dd2b63a26523843ef532 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)