This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Fix constexpr switch handling (PR c++/77467)
- From: Jason Merrill <jason at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 16 Sep 2016 15:51:11 -0400
- Subject: Re: [C++ PATCH] Fix constexpr switch handling (PR c++/77467)
- Authentication-results: sourceware.org; auth=none
- References: <20160905171119.GU14857@tucnak.redhat.com>
On Mon, Sep 5, 2016 at 1:11 PM, Jakub Jelinek <jakub@redhat.com> 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