From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43293 invoked by alias); 27 Sep 2016 21:24:51 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 43250 invoked by uid 89); 27 Sep 2016 21:24:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Sep 2016 21:24:50 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0A70C3B70C for ; Tue, 27 Sep 2016 21:24:49 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-204-43.brq.redhat.com [10.40.204.43]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8RLOl8X011278 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 27 Sep 2016 17:24:48 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id u8RLOjZw024462; Tue, 27 Sep 2016 23:24:45 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id u8RLOgZA024461; Tue, 27 Sep 2016 23:24:42 +0200 Date: Tue, 27 Sep 2016 21:33:00 -0000 From: Jakub Jelinek To: Jason Merrill Cc: gcc-patches List Subject: Patch ping Message-ID: <20160927212442.GF7282@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20160905171119.GU14857@tucnak.redhat.com> <20160916204408.GM7282@tucnak.redhat.com> <20160920161226.GW7282@tucnak.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160920161226.GW7282@tucnak.redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg02069.txt.bz2 Hi! On Tue, Sep 20, 2016 at 06:12:26PM +0200, Jakub Jelinek wrote: > 2016-09-20 Jakub Jelinek > > PR c++/77467 > * constexpr.c (enum constexpr_switch_state): New. > (struct constexpr_ctx): Add css_state field. > (label_matches): Add CTX and STMT arguments, remove I and > DEFAULT_LABEL. For CASE_LABEL_EXPR assert ctx->css_state != NULL, > handle default labels according to css_state. > (cxx_eval_statement_list): Remove statement skipping, label_matches > and default_label handling code. > (cxx_eval_loop_expr): Exit after first iteration even if > switches (jump_target). > (cxx_eval_switch_expr): Set up css_state field in ctx, if default > label has been seen in the body, but no cases matched, evaluate > the body second time. > (cxx_eval_constant_expression): Handle stmt skipping and label_matches > here. Handle PREDICT_EXPR. For MODIFY_EXPR or INIT_EXPR, assert > statement is not skipped. For COND_EXPR during skipping, don't > evaluate condition, just the then block and if still skipping at the > end also the else block. > (cxx_eval_outermost_constant_expr): Adjust constexpr_ctx initializer. > (is_sub_constant_expr): Likewise. > > * g++.dg/cpp1y/constexpr-77467.C: New test. I'd like to ping this patch. Ok for trunk? Jakub