From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4ABC2385700B; Wed, 22 Jul 2020 13:16:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4ABC2385700B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1595423806; bh=b9xuRpsn03O6TRbuQEF2AK0HU7SmQO56xqP5fw8rWBQ=; h=From:To:Subject:Date:From; b=uNpuIDcM8DGIBWSe7KOBJPRC9mQBoFh3F9kx/PemhxKp4V/wAcgCOU9YX++Plu+Jx oce+hXpEWZPMAZFGJW1JQUsFI8+NDmaJbuXsQatVgAW4mk3L4znB2WTTZgoE2DXpSE QUt8vIw6a9ERiw+KOyPl59Ff5ZRqJ2cTbLr7BJ6M= From: "david at westcontrol dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/96284] New: Outdated C features should be made errors with newer standards Date: Wed, 22 Jul 2020 13:16:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: david at westcontrol dot com X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Wed, 22 Jul 2020 13:16:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96284 Bug ID: 96284 Summary: Outdated C features should be made errors with newer standards Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: david at westcontrol dot com Target Milestone: --- 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 decade= s, perhaps it is time for it to be treated as an error by default and require = an explicit flag. (This is in the same style as bug 85678 making "-fno-common" the default.) For example, implicit function declarations from K&R C were made obsolescen= t 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. Could this be made an error by default (-Werror=3Dimplicit-function-declara= tions) ? Let those who want to compile old code with implicit function declaratio= ns, do so with an explicit flag.=