Re: [C++ PATCH] Fix constexpr handling of >y (PR c++/84463, take 2)

2018-04-17 Thread Jason Merrill
Ok. On Tue, Apr 17, 2018, 10:28 AM Jakub Jelinek wrote: > On Mon, Apr 16, 2018 at 10:55:34PM +, Jason Merrill wrote: > > On Mon, Apr 16, 2018, 1:31 PM Jakub Jelinek wrote: > > > > > On Mon, Apr 16, 2018 at 09:28:43PM +0200, Jakub Jelinek wrote: > > > >

[C++ PATCH] Fix constexpr handling of >y (PR c++/84463, take 2)

2018-04-17 Thread Jakub Jelinek
On Mon, Apr 16, 2018 at 10:55:34PM +, Jason Merrill wrote: > On Mon, Apr 16, 2018, 1:31 PM Jakub Jelinek wrote: > > > On Mon, Apr 16, 2018 at 09:28:43PM +0200, Jakub Jelinek wrote: > > > On the following new testcase we emit 2 different constexpr errors > > > because of

Re: [C++ PATCH] Fix constexpr handling of >y (PR c++/84463)

2018-04-16 Thread Jason Merrill
On Mon, Apr 16, 2018, 1:31 PM Jakub Jelinek wrote: > On Mon, Apr 16, 2018 at 09:28:43PM +0200, Jakub Jelinek wrote: > > On the following new testcase we emit 2 different constexpr errors > > because of premature folding, where the PR44100 hack which is supposed > > to fold

[C++ PATCH] Fix constexpr handling of >y (PR c++/84463)

2018-04-16 Thread Jakub Jelinek
Hi! On the following new testcase we emit 2 different constexpr errors because of premature folding, where the PR44100 hack which is supposed to fold expressions like &((S *)0)->f or &((S *)24)->f folds all the >y expressions if x is TREE_CONSTANT into (some type)(x + cst) where what we were

Re: [C++ PATCH] Fix constexpr handling of >y (PR c++/84463)

2018-04-16 Thread Jakub Jelinek
On Mon, Apr 16, 2018 at 09:28:43PM +0200, Jakub Jelinek wrote: > On the following new testcase we emit 2 different constexpr errors > because of premature folding, where the PR44100 hack which is supposed > to fold expressions like &((S *)0)->f or > &((S *)24)->f folds all the >y expressions if x