aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.cc
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2024-11-14 12:42:25 +0100
committerFlorian Weimer <fweimer@redhat.com>2024-11-15 12:18:42 +0100
commit8833389e90d676baabb35c3e7a021a4f5444a5ba (patch)
tree94537a74c81cafc0548890b057fc58478c67ff5f /gcc/fortran/trans-expr.cc
parent71bf2bef5e99aad810eb65847d878360a0042a02 (diff)
downloadgcc-8833389e90d676baabb35c3e7a021a4f5444a5ba.zip
gcc-8833389e90d676baabb35c3e7a021a4f5444a5ba.tar.gz
gcc-8833389e90d676baabb35c3e7a021a4f5444a5ba.tar.bz2
c: Introduce -Wmissing-parameter-name
Empirically, omitted parameter names are difficult to catch in code review. With this change, projects can build with -Werror=missing-parameter-name, to avoid this unnecessary incompatibility with older GCC versions. The existing -pedantic-errors option is too broad for that because it also flags widely used and widely available GCC extensions. Likewise for -Werror=c11-c23-compat. gcc/c-family/ * c-opts.cc (c_common_post_options): Initialize warn_missing_parameter_name. * c.opt (Wmissing-parameter-name): New. gcc/c/ * c-decl.cc (store_parm_decls_newstyle): Use OPT_Wmissing_parameter_name for missing parameter name warning. * c-errors.cc (pedwarn_c11): Enable fine-grained warning control via the option_id argument. gcc/ * doc/invoke.texi: Document Wmissing-parameter-name. gcc/testsuite/ * gcc.dg/Wmissing-parameter-name-1.c: New test. * gcc.dg/Wmissing-parameter-name-2.c: New test. * gcc.dg/Wmissing-parameter-name-3.c: New test.
Diffstat (limited to 'gcc/fortran/trans-expr.cc')
0 files changed, 0 insertions, 0 deletions