public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96184] [9/10 Regression] GCC treats "use of local variable with automatic storage from containing function" differently in versions Date: Fri, 10 Sep 2021 06:56:08 +0000 [thread overview] Message-ID: <bug-96184-4-giNV4xj8Le@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-96184-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96184 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Keywords| |rejects-valid Ever confirmed|0 |1 Summary|GCC treats "use of local |[9/10 Regression] GCC |variable with automatic |treats "use of local |storage from containing |variable with automatic |function" differently in |storage from containing |versions |function" differently in | |versions Target Milestone|--- |9.5 Last reconfirmed| |2021-09-10 --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- So I think it is legal because if we have: int main(){ int a = 10; int const b = 10; static constexpr int d = b ? 0 : a = b; auto p1 = [ ] () noexcept ( d) { return d;}; return d; } the d is a constexpr at this point and a valid one and was even accepted before in GCC 8.5.0. So this is only a regression in GCC 9 and GCC 10.
next prev parent reply other threads:[~2021-09-10 6:56 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-13 12:41 [Bug c++/96184] New: " haoxintu at gmail dot com 2020-07-29 3:27 ` [Bug c++/96184] " haoxintu at gmail dot com 2020-11-04 15:49 ` redi at gcc dot gnu.org 2021-09-10 6:56 ` pinskia at gcc dot gnu.org [this message] 2021-09-10 20:05 ` [Bug c++/96184] [11/12 Regression] " jason at gcc dot gnu.org 2021-09-13 2:48 ` jason at gcc dot gnu.org 2021-09-13 2:50 ` jason at gcc dot gnu.org 2022-01-08 10:46 ` pinskia at gcc dot gnu.org 2022-04-21 7:48 ` rguenth at gcc dot gnu.org 2023-05-29 10:03 ` [Bug c++/96184] [11/12/13/14 " jakub 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-96184-4-giNV4xj8Le@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).