public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jsm28 at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/97882] [8/9/10/11 Regression] Segmentation Fault on improper redeclaration of function Date: Tue, 17 Nov 2020 22:19:32 +0000 [thread overview] Message-ID: <bug-97882-4-DzgLbdeMbZ@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-97882-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97882 Joseph S. Myers <jsm28 at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2020-11-17 Target Milestone|--- |8.5 Status|UNCONFIRMED |NEW Summary|Segmentation Fault on |[8/9/10/11 Regression] |improper redeclaration of |Segmentation Fault on |function |improper redeclaration of | |function Ever confirmed|0 |1 --- Comment #1 from Joseph S. Myers <jsm28 at gcc dot gnu.org> --- Looks like a regression in GCC 7 relative to GCC 6. Whether this code is valid or invalid GNU C is a tricky question, but I'm inclined to say that when the incomplete enum type extension is used, we should *not* count such enums as compatible with unsigned int since we don't know what members the enum will have once completed. So, for example, I think we ought to reject extern enum foo *x; unsigned int *x; and certainly ought to reject extern enum foo *x; unsigned int *x; enum foo { A = -1 }; where the enum ends up compatible with int rather than unsigned int. (But a patch involving rejecting such code might not be such a good idea for backporting, given the risk of breaking user programs that build OK with the release branch compilers.) (A C11 defect fix incorporated in C17 means a qualifier on a function return type is ignored, so whether the code is valid is not affected by the "const" in the original test case.)
next prev parent reply other threads:[~2020-11-17 22:19 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-17 21:22 [Bug c/97882] New: " jarod.keene at trojans dot dsu.edu 2020-11-17 22:19 ` jsm28 at gcc dot gnu.org [this message] 2020-11-18 15:29 ` [Bug c/97882] [8/9/10/11 Regression] " jakub at gcc dot gnu.org 2021-01-14 9:41 ` rguenth at gcc dot gnu.org 2021-02-02 17:06 ` msebor at gcc dot gnu.org 2021-02-02 17:41 ` msebor at gcc dot gnu.org 2021-02-03 23:23 ` msebor at gcc dot gnu.org 2021-02-04 21:54 ` cvs-commit at gcc dot gnu.org 2021-02-04 21:55 ` msebor at gcc dot gnu.org 2021-07-29 17:13 ` pinskia at gcc dot gnu.org 2021-07-29 17:16 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-97882-4-DzgLbdeMbZ@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).