public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/96284] New: Outdated C features should be made errors with newer standards
@ 2020-07-22 13:16 david at westcontrol dot com
  2020-07-22 14:09 ` [Bug c/96284] " rguenth at gcc dot gnu.org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: david at westcontrol dot com @ 2020-07-22 13:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96284

            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 decades,
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 obsolescent 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=implicit-function-declarations)
?  Let those who want to compile old code with implicit function declarations,
do so with an explicit flag.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-12-01  8:41 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22 13:16 [Bug c/96284] New: Outdated C features should be made errors with newer standards david at westcontrol dot com
2020-07-22 14:09 ` [Bug c/96284] " rguenth at gcc dot gnu.org
2020-07-22 14:51 ` redi at gcc dot gnu.org
2020-07-22 17:18 ` msebor at gcc dot gnu.org
2020-07-22 17:33 ` msebor at gcc dot gnu.org
2020-07-28  5:57 ` egallager at gcc dot gnu.org
2020-07-28  7:20 ` david at westcontrol dot com
2020-07-28  7:39 ` fw at gcc dot gnu.org
2021-12-15  7:01 ` egallager at gcc dot gnu.org
2023-12-01  7:12 ` cvs-commit at gcc dot gnu.org
2023-12-01  7:12 ` cvs-commit at gcc dot gnu.org
2023-12-01  7:12 ` cvs-commit at gcc dot gnu.org
2023-12-01  7:12 ` cvs-commit at gcc dot gnu.org
2023-12-01  7:12 ` cvs-commit at gcc dot gnu.org
2023-12-01  7:15 ` fw at gcc dot gnu.org
2023-12-01  7:15 ` fw at gcc dot gnu.org
2023-12-01  8:21 ` sjames at gcc dot gnu.org
2023-12-01  8:21 ` sjames at gcc dot gnu.org
2023-12-01  8:41 ` david at westcontrol dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).