From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 119713 invoked by alias); 16 Sep 2016 19:51:35 -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 119704 invoked by uid 89); 16 Sep 2016 19:51:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.2 spammy=nervous X-HELO: mail-oi0-f43.google.com Received: from mail-oi0-f43.google.com (HELO mail-oi0-f43.google.com) (209.85.218.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 16 Sep 2016 19:51:33 +0000 Received: by mail-oi0-f43.google.com with SMTP id m11so124376366oif.1 for ; Fri, 16 Sep 2016 12:51:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=UaPF2O27MMquHlfC25urRLFGgaNMXuBqkLcChZQM1ME=; b=VPrH1NXdTlIUdUsrThpcVVEbccca4DJI3jTTEoOroaLayCH4jvaSo8Ywl68JAU4/gC XjXfOukYiKUAzIRD47HiuQ9JKjp3v8+tgXsGHC11VMf81sCWQQLwDb/XNjRSpv6sncfL 7cZYOTF10sCUg/KmAs7QDmTKY+ho4c6aIRHyQbdEiPUHjbVeHwXTGarPPVnXbk3lzTK3 pj37vtiuqZhQf0E0g+56kVyGwKVzjmmdUukHY9/yKW1HI/tm6b0R36SUdRWDWldS5pXD g6M4k8DN37r1m4IUXrimew1sdxU+TGdgUg76TjDQ7f3IgdWBYPN3QCQ0vxKIYS6Haxis V13A== X-Gm-Message-State: AE9vXwOj867rYyIOjv5b2hVF1SJP0l6Z76qNoSHc71E7YdALX/u1qKdrFrLG3lpgEuJrv54v7BOtDOUWTTJgJWWY X-Received: by 10.202.92.197 with SMTP id q188mr14319442oib.79.1474055491757; Fri, 16 Sep 2016 12:51:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.105.169 with HTTP; Fri, 16 Sep 2016 12:51:11 -0700 (PDT) In-Reply-To: <20160905171119.GU14857@tucnak.redhat.com> References: <20160905171119.GU14857@tucnak.redhat.com> From: Jason Merrill Date: Fri, 16 Sep 2016 20:00:00 -0000 Message-ID: Subject: Re: [C++ PATCH] Fix constexpr switch handling (PR c++/77467) To: Jakub Jelinek Cc: gcc-patches List Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg01085.txt.bz2 On Mon, Sep 5, 2016 at 1:11 PM, Jakub Jelinek wrote: > + /* If body is a statement other than STATEMENT_LIST or BIND_EXPR, > + it should be skipped. E.g. switch (a) b = a; */ > + if (TREE_CODE (body) == STATEMENT_LIST > + || TREE_CODE (body) == BIND_EXPR) I'm nervous about this optimization for useless code breaking other things that might (one day) wrap a case label; I think I'd prefer to drop the condition. OK with that change, for trunk and 6. Jason