public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/67371] Never executed "throw" in constexpr function fails to compile Date: Fri, 28 Aug 2015 08:43:00 -0000 [thread overview] Message-ID: <bug-67371-4-ZKYtbRmDdR@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-67371-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67371 --- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- The fix might be as simple as: diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 1eacb8be9a44..7016b347a79c 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -4324,7 +4324,6 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, case VEC_NEW_EXPR: case DELETE_EXPR: case VEC_DELETE_EXPR: - case THROW_EXPR: case OMP_ATOMIC: case OMP_ATOMIC_READ: case OMP_ATOMIC_CAPTURE_OLD: @@ -4629,6 +4628,9 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, /* We can see these in statement-expressions. */ return true; + case THROW_EXPR: + return true; + default: if (objc_is_property_ref (t)) return false;
next prev parent reply other threads:[~2015-08-28 8:43 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-08-27 13:26 [Bug c++/67371] New: " ldionne.2 at gmail dot com 2015-08-27 22:52 ` [Bug c++/67371] " ldionne.2 at gmail dot com 2015-08-28 5:30 ` trippels at gcc dot gnu.org 2015-08-28 5:32 ` trippels at gcc dot gnu.org 2015-08-28 8:43 ` trippels at gcc dot gnu.org [this message] 2015-08-28 8:57 ` miyuki at gcc dot gnu.org 2015-08-28 9:37 ` trippels at gcc dot gnu.org 2015-08-28 10:06 ` Casey at Carter dot net 2015-08-29 18:52 ` trippels at gcc dot gnu.org 2015-08-29 18:55 ` trippels 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-67371-4-ZKYtbRmDdR@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).