public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94326] g++: error: pack.ii: ‘-fcompare-debug’ failure (length) Date: Fri, 27 Mar 2020 09:05:23 +0000 [thread overview] Message-ID: <bug-94326-4-CzgNNiva0P@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-94326-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94326 --- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:2eea00c518d5a72d0bdbc810ae675e7ad5fee414 commit r10-7411-g2eea00c518d5a72d0bdbc810ae675e7ad5fee414 Author: Jakub Jelinek <jakub@redhat.com> Date: Fri Mar 27 10:04:31 2020 +0100 c++: Avoid calls in non-evaluated contexts affect whether function can or can't throw [PR94326] The following testcase FAILs -fcompare-debug, because if we emit a -Wreturn-local-addr warning, we tsubst decltype in order to print the warning and as that function could throw, set_flags_from_callee during that sets cp_function_chain->can_throw and later on we don't set TREE_NOTHROW on foo. While with -w or -Wno-return-local-addr, tsubst isn't called during the warning_at, cp_function_chain->can_throw is kept clear and TREE_NOTHROW is set on foo. It isn't just a matter of the warning though, in int foo (); int bar () { return sizeof (foo ()); } int baz () { return sizeof (int); } I don't really see why we should mark only baz as TREE_NOTHROW and not bar too, when neither can really throw. 2020-03-27 Jakub Jelinek <jakub@redhat.com> PR c++/94326 * call.c (set_flags_from_callee): Don't update cp_function_chain->can_throw or current_function_returns_abnormally if cp_unevaluated_operand. * g++.dg/other/pr94326.C: New test.
next prev parent reply other threads:[~2020-03-27 9:05 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-25 13:09 [Bug debug/94326] New: " marxin at gcc dot gnu.org 2020-03-25 13:09 ` [Bug debug/94326] " marxin at gcc dot gnu.org 2020-03-25 15:27 ` marxin at gcc dot gnu.org 2020-03-26 12:30 ` [Bug c++/94326] " jakub at gcc dot gnu.org 2020-03-26 12:31 ` jakub at gcc dot gnu.org 2020-03-26 13:58 ` jakub at gcc dot gnu.org 2020-03-26 14:05 ` jakub at gcc dot gnu.org 2020-03-27 9:05 ` cvs-commit at gcc dot gnu.org [this message] 2020-03-27 20:19 ` 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-94326-4-CzgNNiva0P@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).