On Mon, 18 Nov 2024, Florian Weimer wrote: > This is another recent GCC extension whose use is apparently > difficult to spot in code reviews. > > The name of the option is due to Jonathan Wakely. Part of it > could apply to C++ as well (for labels at the end of a compound > statement). > > gcc/c-family/ > > * c-opts.cc (c_common_post_options): Initialize > warn_free_labels. > * c.opt (Wfree-labels): New option. > * c.opt.urls: Regenerate. > > gcc/c/ > > * c-parser.cc (c_parser_compound_statement_nostart): Use > OPT_Wfree_labels for warning about labels on declarations. > (c_parser_compound_statement_nostart): Use OPT_Wfree_labels > for warning about labels at end of compound statements. > > gcc/ > > * doc/invoke.texi: Document -Wfree-labels. > > gcc/testsuite/ > > * gcc.dg/Wfree-labels-1.c: New test. > * gcc.dg/Wfree-labels-2.c: New test. > * gcc.dg/Wfree-labels-3.c: New test.
OK. -- Joseph S. Myers josmy...@redhat.com