Re: [C++ PATCH] Fix constexpr handling of arrays with unknown bound (PR c++/83993)

2018-01-31 Thread Jason Merrill
OK. On Wed, Jan 31, 2018 at 12:45 PM, Jakub Jelinek wrote: > On Wed, Jan 31, 2018 at 11:02:36AM -0500, Jason Merrill wrote: >> > In this case I was just extending existing warning and wanted >> > consistency with that. Both can be changed in a GCC9 follow-up, >> > or if Jason/Nathan want it now,

Re: [C++ PATCH] Fix constexpr handling of arrays with unknown bound (PR c++/83993)

2018-01-31 Thread Jakub Jelinek
On Wed, Jan 31, 2018 at 11:02:36AM -0500, Jason Merrill wrote: > > In this case I was just extending existing warning and wanted > > consistency with that. Both can be changed in a GCC9 follow-up, > > or if Jason/Nathan want it now, even for GCC8, sure. So, do you want %qE as in the patch or %E?

Re: [C++ PATCH] Fix constexpr handling of arrays with unknown bound (PR c++/83993)

2018-01-31 Thread Jason Merrill
On Thu, Jan 25, 2018 at 5:53 PM, Jakub Jelinek wrote: > On Thu, Jan 25, 2018 at 01:13:56PM -0700, Martin Sebor wrote: >> On 01/24/2018 04:19 PM, Jakub Jelinek wrote: >> > Hi! >> > >> > In constexpr evaluation of array references for arrays with unknown bounds, >> > we need to diagnose out of bound

Re: [C++ PATCH] Fix constexpr handling of arrays with unknown bound (PR c++/83993)

2018-01-25 Thread Jakub Jelinek
On Thu, Jan 25, 2018 at 01:13:56PM -0700, Martin Sebor wrote: > On 01/24/2018 04:19 PM, Jakub Jelinek wrote: > > Hi! > > > > In constexpr evaluation of array references for arrays with unknown bounds, > > we need to diagnose out of bounds accesses, but really don't know the bounds > > at compile t

Re: [C++ PATCH] Fix constexpr handling of arrays with unknown bound (PR c++/83993)

2018-01-25 Thread Martin Sebor
On 01/24/2018 04:19 PM, Jakub Jelinek wrote: Hi! In constexpr evaluation of array references for arrays with unknown bounds, we need to diagnose out of bounds accesses, but really don't know the bounds at compile time, right now GCC will see nelts as error_mark_node + 1 and will not consider the

[C++ PATCH] Fix constexpr handling of arrays with unknown bound (PR c++/83993)

2018-01-24 Thread Jakub Jelinek
Hi! In constexpr evaluation of array references for arrays with unknown bounds, we need to diagnose out of bounds accesses, but really don't know the bounds at compile time, right now GCC will see nelts as error_mark_node + 1 and will not consider them a constant expression at all. >From the clang