From: Alejandro Colomar Date: Sun, 2 Nov 2025 18:45:29 +0000 (+0100) Subject: gcc/: Rename warn_parm_array_mismatch() => warn_parms_array_mismatch() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c106443b441e278fcadf12cfdb0839d16106e44c;p=thirdparty%2Fgcc.git gcc/: Rename warn_parm_array_mismatch() => warn_parms_array_mismatch() This function acts on entire parameter declaration lists, and iterates over them. Use plural in the name, to clarify that it acts on parameters, not just on a single parameter. gcc/c-family/ChangeLog: * c-common.h (warn_parm_array_mismatch): Rename warn_parm_array_mismatch => warn_parms_array_mismatch. * c-warn.cc (warn_parm_array_mismatch): Rename warn_parm_array_mismatch => warn_parms_array_mismatch. gcc/c/ChangeLog: * c-decl.cc (start_function): Rename warn_parm_array_mismatch => warn_parms_array_mismatch. * c-parser.cc (c_parser_declaration_or_fndef): Rename warn_parm_array_mismatch => warn_parms_array_mismatch. Signed-off-by: Alejandro Colomar --- diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index bedbd4a94b0..8b7f4ae4471 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -1624,7 +1624,7 @@ extern void c_do_switch_warnings (splay_tree, location_t, tree, tree, bool); extern void warn_for_omitted_condop (location_t, tree); extern bool warn_for_restrict (unsigned, tree *, unsigned); extern void warn_for_address_of_packed_member (tree, tree); -extern void warn_parm_array_mismatch (location_t, tree, tree); +extern void warn_parms_array_mismatch (location_t, tree, tree); extern void maybe_warn_sizeof_array_div (location_t, tree, tree, tree, tree); extern void do_warn_array_compare (location_t, tree_code, tree, tree); diff --git a/gcc/c-family/c-warn.cc b/gcc/c-family/c-warn.cc index 09517d28ba1..a771444184f 100644 --- a/gcc/c-family/c-warn.cc +++ b/gcc/c-family/c-warn.cc @@ -3431,7 +3431,7 @@ expr_to_str (pretty_printer &pp, tree expr, const char *dflt) (FNDECL's is set to the location of the redeclaration). */ void -warn_parm_array_mismatch (location_t origloc, tree fndecl, tree newparms) +warn_parms_array_mismatch (location_t origloc, tree fndecl, tree newparms) { /* The original parameter list (copied from the original declaration into the current [re]declaration, FNDECL)). The two are equal if diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc index 1e1da2d2a35..0a368e410e5 100644 --- a/gcc/c/c-decl.cc +++ b/gcc/c/c-decl.cc @@ -10920,7 +10920,7 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator, if (old_decl) { location_t origloc = DECL_SOURCE_LOCATION (old_decl); - warn_parm_array_mismatch (origloc, old_decl, parms); + warn_parms_array_mismatch (origloc, old_decl, parms); } /* To enable versions to be created across TU's we mark and mangle all diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc index 9b3a7861dfa..d8b7beea923 100644 --- a/gcc/c/c-parser.cc +++ b/gcc/c/c-parser.cc @@ -3013,7 +3013,7 @@ c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok, && DECL_INITIAL (d) == NULL_TREE) DECL_ARGUMENTS (d) = parms; - warn_parm_array_mismatch (lastloc, d, parms); + warn_parms_array_mismatch (lastloc, d, parms); } } if (omp_declare_simd_clauses