From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7AE10385840A; Tue, 8 Nov 2022 19:40:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7AE10385840A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667936416; bh=x6+3ONF2tbFGi6YyS8IPXVGpBWgv6T7wW1IU/r11D0w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=s5VVNgb9o+XwsOXdHDoftwtk9hfoal11MmMjs0kVmbYrEXqi2at7PV2HeKgF2U9Yv gjWICGhgiwg4LLOstSVYK6nWSl/sLW1TQ+0koe/VyEGXZA8OdM3jQkrTgYt/lpeZSn jtM91Fu5yHMqPg2p55BK/eVstsA2EIBU9SYvzNSg= From: "sam at gentoo dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/82922] Request: add -Wstrict-prototypes to -Wextra as K&R style is obsolescent Date: Tue, 08 Nov 2022 19:40:15 +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, patch X-Bugzilla-Severity: normal X-Bugzilla-Who: sam at gentoo dot 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D82922 --- Comment #10 from Sam James --- (In reply to David Brown from comment #9) > Could -Wstrict-prototypes be added to -Wall, or even considered enabling = by > default? The next C standard will make "void foo()" mean the same as "vo= id > foo(void)", like in C++, which makes the scope for confusion high. Yes please, given Clang has done this (or essentially this, and added its o= wn -Wdeprecated-non-prototype): - https://lwn.net/Articles/913505/ - https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-= implicit-function-declaration/65213 - https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6= e240 Anything which makes it easier to spot things which are going to become fat= al in future is a good idea. Otherwise we'll have a headache now with Clang an= d a headache in a few years when defaults shift to c23.=