Re: [C++ PATCH] Fix constexpr switch handling (PR c++/77467, take 2)

2016-09-28 Thread Jason Merrill
OK, thanks. Jason

Re: [C++ PATCH] Fix constexpr switch handling (PR c++/77467)

2016-09-19 Thread Jason Merrill
On Fri, Sep 16, 2016 at 4:44 PM, Jakub Jelinek wrote: > On Fri, Sep 16, 2016 at 03:51:11PM -0400, Jason Merrill wrote: >> 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

Re: [C++ PATCH] Fix constexpr switch handling (PR c++/77467)

2016-09-16 Thread Jakub Jelinek
On Fri, Sep 16, 2016 at 03:51:11PM -0400, Jason Merrill wrote: > 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 >

Re: [C++ PATCH] Fix constexpr switch handling (PR c++/77467)

2016-09-16 Thread Jason Merrill
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 optim