Compile tested for the ia64-elf target; bootstrap and regtest running on x86_64-redhat-linux. Ok for trunk when successful?
ia64-elf build fails with the following warning: [all 2024-01-12 16:32:34] ../../gcc/gcc/config/ia64/ia64.cc:3889:59: error: unused parameter 'decl' [-Werror=unused-parameter] [all 2024-01-12 16:32:34] 3889 | ia64_start_function (FILE *file, const char *fnname, tree decl) decl is passed to ASM_OUTPUT_FUNCTION_LABEL (), whose default implementation does not use it. Mark it as used in order to avoid the warning. Reported-by: Jan-Benedict Glaw <jbg...@lug-owl.de> Suggested-by: Jan-Benedict Glaw <jbg...@lug-owl.de> Fixes: c659dd8bfb55 ("Implement ASM_DECLARE_FUNCTION_NAME using ASM_OUTPUT_FUNCTION_LABEL") Signed-off-by: Ilya Leoshkevich <i...@linux.ibm.com> gcc/ChangeLog: * defaults.h (ASM_OUTPUT_FUNCTION_LABEL): Mark DECL as used. --- gcc/defaults.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/defaults.h b/gcc/defaults.h index 92f3e07f742..1a2ea68a543 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -149,8 +149,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see NAME, such as the label on a function. */ #ifndef ASM_OUTPUT_FUNCTION_LABEL -#define ASM_OUTPUT_FUNCTION_LABEL(FILE, NAME, DECL) \ - assemble_function_label_raw ((FILE), (NAME)) +#define ASM_OUTPUT_FUNCTION_LABEL(FILE, NAME, DECL) \ + do { \ + (void) (DECL); \ + assemble_function_label_raw ((FILE), (NAME)); \ + } while (0) #endif /* Output the definition of a compiler-generated label named NAME. */ -- 2.43.0