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: Sat, 29 Aug 2015 18:52:00 -0000 [thread overview] Message-ID: <bug-67371-4-NyCL7Bd3qp@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 #8 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- Author: trippels Date: Sat Aug 29 18:51:26 2015 New Revision: 227323 URL: https://gcc.gnu.org/viewcvs?rev=227323&root=gcc&view=rev Log: Fix c++/67371 (issues with throw in constexpr) As PR67371 shows gcc currently rejects all throw statements in constant-expressions, even when they are never executed. PR c++/67371 * constexpr.c (potential_constant_expression_1): Remove IF_STMT case. Move label to COND_EXPR case. Remove checking of SWITCH_STMT_BODY. Added: trunk/gcc/testsuite/g++.dg/cpp1y/constexpr-new.C trunk/gcc/testsuite/g++.dg/cpp1y/constexpr-throw.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/constexpr.c
next prev parent reply other threads:[~2015-08-29 18:52 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 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 [this message] 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-NyCL7Bd3qp@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).