Alejandro Colomar 33c35b7f4c c, objc: Add -Wmultiple-parameter-fwd-decl-lists
Warn about this:

	void f(int x; int x; int x);

Add a new diagnostic, -Wmultiple-parameter-fwd-decl-lists, which
diagnoses uses of this obsolescent syntax.

Add this diagnostic in -Wextra.

Forward declarations of parameters are very rarely used.  And functions
that need two forward declaractions of parameters are also quite rare.
This combination results in this code almost not existing in any code
base, which makes adding this to -Wextra okay.  FWIW, I've tried finding
such code using a code search engine, and didn't find any cases (but the
regex for that isn't easy to writei, so I wouldn't trust it).

gcc/c-family/ChangeLog:

	* c.opt: Add -Wmultiple-parameter-fwd-decl-lists

gcc/c/ChangeLog:

	* c-decl.cc (c_scope): Rename {warned > had}_forward_parm_decls.
	(mark_forward_parm_decls): Add
	-Wmultiple-parameter-fwd-decl-lists.

gcc/ChangeLog:

	* doc/extend.texi: Clarify documentation about lists of
	parameter forward declarations, and mention that more than one
	of them are unnecessary.
	* doc/invoke.texi: Document the new
	-Wmultiple-parameter-fwd-decl-lists.

gcc/testsuite/ChangeLog:

	* gcc.dg/Wmultiple-parameter-fwd-decl-lists.c: New test.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-26 19:28:24 +00:00
2025-09-24 00:21:37 +00:00
2025-09-24 00:21:37 +00:00
2025-09-26 00:20:03 +00:00
2025-09-06 00:20:34 +00:00
2025-09-03 00:20:18 +00:00
2025-09-20 00:20:23 +00:00
2025-09-19 00:20:17 +00:00
2025-09-08 00:20:50 +00:00
2025-09-02 00:19:26 +00:00
2025-09-24 00:21:37 +00:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.
Description
No description provided
Readme 4.2 GiB
Languages
C++ 30.7%
C 30.2%
Ada 14.4%
D 6.1%
Go 5.7%
Other 12.4%