On Thu, 14 Nov 2024, Florian Weimer wrote: > * c-family/c-opts.cc (c_common_post_options): Initialize > warn_missing_parameter_name. > * c-family/c.opt (Wmissing-parameter-name): New. > * c/c-decl.cc (store_parm_decls_newstyle): Use > OPT_Wmissing_parameter_name for missing parameter name > warning. > * c/c-errors.cc (pedwarn_c11): Enable fine-grained warning > control via the option_id argument. > * doc/invoke.texi: Document Wmissing-parameter-name. > * testsuite/gcc.dg/Wmissing-parameter-name-1.c: New test. > * testsuite/gcc.dg/Wmissing-parameter-name-2.c: New test. > * testsuite/gcc.dg/Wmissing-parameter-name-3.c: New test.
ChangeLog entries should go in appropriate subdirectory ChangeLogs, e.g. c-family/ * c-family/c-opts.cc (c_common_post_options): Initialize [...] > +@opindex Wmissing-parameter-name > +@opindex Wno-missing-parameter-name > +@item -Wmissing-parameter-name @r{(C and Objective-C only)} > +Warn if a function definition omits are parameter name, specifying only Omits *a* parameter name. > +its type. This can be used to document that a parameter is unused > +in the definition. It is part of C23 and later dialects of C, > +and available as a GCC extension in all other dialects. > + > +This warning is also enabled by @option{-Wc11-c23-compat}. It is turned > +into an error by @option{-pedantic-errors}. Into an error *if building for a C version before C23*. OK with those fixes. -- Joseph S. Myers josmy...@redhat.com