From bfa7dd84d1a0d83c716715e91c544203a7ad454d Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Sat, 5 Dec 2020 12:34:05 -0500 Subject: [PATCH] aix: fix ASM_OUTPUT_DEF warning ASM_OUTPUT_DEF is used by GCC as a proxy to enable alias support. But the macro does not provide the necessary implementation for symbol aliasing on AIX, which uses a different implementation. On AIX, the macro was empty. Because the macro is empty, none of the macro argument are used, which means that some of the variables in the function that calls the macro are never used. This causes a warning when building varasm.c, and -Werror converts that into a fatal error. This patch references the macro arguments as (void) to prevent the warning. 2020-12-05 Rainer Orth David Edelsohn gcc/ChangeLog: * config/rs6000/xcoff.h (ASM_OUTPUT_DEF): Reference macro arguments. --- gcc/config/rs6000/xcoff.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/config/rs6000/xcoff.h b/gcc/config/rs6000/xcoff.h index 0f40b45b27b..fe6221aae09 100644 --- a/gcc/config/rs6000/xcoff.h +++ b/gcc/config/rs6000/xcoff.h @@ -273,7 +273,9 @@ We still need to define this macro to let middle-end know that aliases are supported. */ -#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) do { } while (0) +#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) do { (void) (FILE); \ + (void) (LABEL1); \ + (void) (LABEL2); } while (0) /* Used by rs6000_assemble_integer, among others. */ -- 2.30.2