Re: C++ PATCH for c++/87567, constexpr rejects call to non-constexpr function

2018-10-10 Thread Marek Polacek
On Wed, Oct 10, 2018 at 03:48:34PM -0400, Jason Merrill wrote: > On Wed, Oct 10, 2018 at 11:58 AM Marek Polacek wrote: > > > > In this testcase, the call to f() can never be a constant expression, but > > that's not a problem because it is never reached. We handle a similar > > scenario > > for

Re: C++ PATCH for c++/87567, constexpr rejects call to non-constexpr function

2018-10-10 Thread Jason Merrill
On Wed, Oct 10, 2018 at 11:58 AM Marek Polacek wrote: > > In this testcase, the call to f() can never be a constant expression, but > that's not a problem because it is never reached. We handle a similar > scenario > for IF_STMT, so we can just do the same. The RANGE_FOR_STMT case seems to >

C++ PATCH for c++/87567, constexpr rejects call to non-constexpr function

2018-10-10 Thread Marek Polacek
In this testcase, the call to f() can never be a constant expression, but that's not a problem because it is never reached. We handle a similar scenario for IF_STMT, so we can just do the same. The RANGE_FOR_STMT case seems to never be reached in the whole testsuite, so I didn't change that.