Re: [PATCH] c++: Verify 'this' of NS member functions in constexpr [PR97230]

2020-10-05 Thread Jason Merrill via Gcc-patches
On 10/1/20 1:08 PM, Marek Polacek wrote: This PR points out that when we're invoking a non-static member function on a null instance during constant evaluation, we should reject. cxx_eval_call_expression calls cxx_bind_parameters_in_call which evaluates function arguments, but it won't detect

[PATCH] c++: Verify 'this' of NS member functions in constexpr [PR97230]

2020-10-01 Thread Marek Polacek via Gcc-patches
This PR points out that when we're invoking a non-static member function on a null instance during constant evaluation, we should reject. cxx_eval_call_expression calls cxx_bind_parameters_in_call which evaluates function arguments, but it won't detect problems like these. Well, ok, so use