From 73a118c209fcbb73c3439ca70fb233a5dc87daf7 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 15 Feb 2022 13:22:15 +0000 Subject: [PATCH] c-family: Remove names of unused parameters C++ allows unnamed parameters, which means we don't need to call them 'dummy' and mark them with the unused attribute. gcc/c-family/ChangeLog: * c-pragma.cc (handle_pragma_pack): Remove parameter name. (handle_pragma_weak): Likewise. (handle_pragma_scalar_storage_order): Likewise. (handle_pragma_redefine_extname): Likewise. (handle_pragma_visibility): Likewise. (handle_pragma_diagnostic): Likewise. (handle_pragma_target): Likewise. (handle_pragma_optimize): Likewise. (handle_pragma_push_options): Likewise. (handle_pragma_pop_options): Likewise. (handle_pragma_reset_options): Likewise. (handle_pragma_message): Likewise. (handle_pragma_float_const_decimal64): Likewise. --- gcc/c-family/c-pragma.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/gcc/c-family/c-pragma.cc b/gcc/c-family/c-pragma.cc index 9004b04..4c80bdd 100644 --- a/gcc/c-family/c-pragma.cc +++ b/gcc/c-family/c-pragma.cc @@ -132,7 +132,7 @@ pop_alignment (tree id) #pragma pack (pop) #pragma pack (pop, ID) */ static void -handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy)) +handle_pragma_pack (cpp_reader *) { location_t loc; tree x, id = 0; @@ -355,7 +355,7 @@ maybe_apply_pending_pragma_weaks (void) /* #pragma weak name [= value] */ static void -handle_pragma_weak (cpp_reader * ARG_UNUSED (dummy)) +handle_pragma_weak (cpp_reader *) { tree name, value, x, decl; enum cpp_ttype t; @@ -418,7 +418,7 @@ maybe_apply_pragma_scalar_storage_order (tree type) } static void -handle_pragma_scalar_storage_order (cpp_reader *ARG_UNUSED(dummy)) +handle_pragma_scalar_storage_order (cpp_reader *) { const char *kind_string; enum cpp_ttype token; @@ -499,7 +499,7 @@ static void handle_pragma_redefine_extname (cpp_reader *); /* #pragma redefine_extname oldname newname */ static void -handle_pragma_redefine_extname (cpp_reader * ARG_UNUSED (dummy)) +handle_pragma_redefine_extname (cpp_reader *) { tree oldname, newname, decls, x; enum cpp_ttype t; @@ -721,7 +721,7 @@ pop_visibility (int kind) specified on the command line. */ static void -handle_pragma_visibility (cpp_reader *dummy ATTRIBUTE_UNUSED) +handle_pragma_visibility (cpp_reader *) { /* Form is #pragma GCC visibility push(hidden)|pop */ tree x; @@ -765,7 +765,7 @@ handle_pragma_visibility (cpp_reader *dummy ATTRIBUTE_UNUSED) } static void -handle_pragma_diagnostic(cpp_reader *ARG_UNUSED(dummy)) +handle_pragma_diagnostic(cpp_reader *) { tree x; location_t loc; @@ -899,7 +899,7 @@ handle_pragma_diagnostic(cpp_reader *ARG_UNUSED(dummy)) /* Parse #pragma GCC target (xxx) to set target specific options. */ static void -handle_pragma_target(cpp_reader *ARG_UNUSED(dummy)) +handle_pragma_target(cpp_reader *) { location_t loc; enum cpp_ttype token; @@ -971,7 +971,7 @@ handle_pragma_target(cpp_reader *ARG_UNUSED(dummy)) /* Handle #pragma GCC optimize to set optimization options. */ static void -handle_pragma_optimize (cpp_reader *ARG_UNUSED(dummy)) +handle_pragma_optimize (cpp_reader *) { enum cpp_ttype token; tree x; @@ -1057,7 +1057,7 @@ static GTY(()) struct opt_stack * options_stack; options. */ static void -handle_pragma_push_options (cpp_reader *ARG_UNUSED(dummy)) +handle_pragma_push_options (cpp_reader *) { enum cpp_ttype token; tree x = 0; @@ -1093,7 +1093,7 @@ handle_pragma_push_options (cpp_reader *ARG_UNUSED(dummy)) optimization options from a previous push_options. */ static void -handle_pragma_pop_options (cpp_reader *ARG_UNUSED(dummy)) +handle_pragma_pop_options (cpp_reader *) { enum cpp_ttype token; tree x = 0; @@ -1150,7 +1150,7 @@ handle_pragma_pop_options (cpp_reader *ARG_UNUSED(dummy)) optimization options to the original options used on the command line. */ static void -handle_pragma_reset_options (cpp_reader *ARG_UNUSED(dummy)) +handle_pragma_reset_options (cpp_reader *) { enum cpp_ttype token; tree x = 0; @@ -1186,7 +1186,7 @@ handle_pragma_reset_options (cpp_reader *ARG_UNUSED(dummy)) /* Print a plain user-specified message. */ static void -handle_pragma_message (cpp_reader *ARG_UNUSED(dummy)) +handle_pragma_message (cpp_reader *) { location_t loc; enum cpp_ttype token; @@ -1291,7 +1291,7 @@ handle_stdc_pragma (const char *pname) #pragma STDC FLOAT_CONST_DECIMAL64 DEFAULT */ static void -handle_pragma_float_const_decimal64 (cpp_reader *ARG_UNUSED (dummy)) +handle_pragma_float_const_decimal64 (cpp_reader *) { if (c_dialect_cxx ()) { -- 2.7.4