From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D1BF43857355; Thu, 28 Apr 2022 16:56:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D1BF43857355 From: "segher at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/87656] Useful flags to enable with -Wall or -Wextra Date: Thu, 28 Apr 2022 16:56:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: diagnostic, meta-bug X-Bugzilla-Severity: enhancement X-Bugzilla-Who: segher at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2022 16:56:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D87656 --- Comment #12 from Segher Boessenkool --- (In reply to David Binderman from comment #11) > -Wold-style-definition >=20 > KnR style function definitions have been deprecated for about 35 years. +1 > Yes, there is a warning for it in gcc, but that warning isn't in either > -Wall or -Wextra.=20 >=20 > Also, switching on -std=3Dc2x only makes it a warning, not an error.=20 > That doesn't sound correct to me. AFAIK KnR is removed from c2x. It can stay there as a GCC extension no problem. If there is a warning for= it it is not a problem anymore, esp. if that warning is in -Wall or on by defa= ult even. The only reason to remove support for this is if it actually simplifies the compiler code itself, which means we have to completely not support it anym= ore. So let's first have a default warning, and then see if anything in the wild still uses old-style functions defs?=