From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D580D3850401; Tue, 28 Jul 2020 05:57:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D580D3850401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1595915829; bh=mk2I2HsgSwjcfHBi1hEZg2ZYOG9FzHmlaiNlRksmFXs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TxsHslaeQt/GwZyCxvUT42T7CVtB/jgOy36zyqZn/CZGfnJYbSU0tS3Z1GK3ykKVk AJB7NxWnfViOJdrn6Eg8GN/TfIjBy16oM9a9u9VGApk2UEiCq8EFyVDUQl3OnfuLrF 3dPiG1PEIbEn08KW6ZvRe93sekS1yW477S2hn8ao= From: "egallager at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/96284] Outdated C features should be made errors with newer standards Date: Tue, 28 Jul 2020 05:57:09 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: egallager 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: cc 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: Tue, 28 Jul 2020 05:57:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96284 Eric Gallager changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |egallager at gcc dot gnu.o= rg, | |fw at gcc dot gnu.org --- Comment #5 from Eric Gallager --- (In reply to David Brown from comment #0) > While C has tried to remain backwards compatible with each new standards > revision, some changes have been made so that particularly unsafe features > from old code are no longer supported. gcc has (reasonably enough) tried= to > keep support for old features, but when something has been deprecated for > decades, perhaps it is time for it to be treated as an error by default a= nd > require an explicit flag. (This is in the same style as bug 85678 making > "-fno-common" the default.) >=20 > For example, implicit function declarations from K&R C were made obsolesc= ent > in C90, and removed from the language in C99. But by default, they still > only cause a warning (-Wimplicit-function-declaration) in gcc, no matter > what standard is picked. >=20 > Could this be made an error by default > (-Werror=3Dimplicit-function-declarations) ? Let those who want to compi= le > old code with implicit function declarations, do so with an explicit flag. I think Florian Weimer tried this and it broke the majority of configure scripts in existence...=