Re: [PATCH] c++: value-dep but not type-dep decltype operand [PR105756]

2022-06-03 Thread Jason Merrill via Gcc-patches
dep but not type-dep decltype operand [PR105756] Here we're crashing when instantiating ahead of time the value-dependent but not type-dependent decltype operand (5 % N) == 0, ultimately because cp_build_binary_op folds its operands for sake of its overflow diagnostics, and as part of this fold

Re: [PATCH] c++: value-dep but not type-dep decltype operand [PR105756]

2022-06-03 Thread Patrick Palka via Gcc-patches
272} > > But in an unevaluated context I suppose we don't need or want to do this > folding. I'll work on a patch to that effect. Here it is: -- >8 -- Subject: [PATCH] c++: value-dep but not type-dep decltype operand [PR105756] Here we're crashing when instantiating ahead o

Re: [PATCH] c++: value-dep but not type-dep decltype operand [PR105756]

2022-06-02 Thread Patrick Palka via Gcc-patches
On Thu, 2 Jun 2022, Jason Merrill wrote: > On 6/1/22 14:20, Patrick Palka wrote: > > r12-7564-gec0f53a3a542e7 made us instantiate non-constant non-dependent > > decltype operands by relaxing instantiate_non_dependent_expr to check > > instantiation_dependent_uneval_expression_p. But as the

Re: [PATCH] c++: value-dep but not type-dep decltype operand [PR105756]

2022-06-02 Thread Jason Merrill via Gcc-patches
On 6/1/22 14:20, Patrick Palka wrote: r12-7564-gec0f53a3a542e7 made us instantiate non-constant non-dependent decltype operands by relaxing instantiate_non_dependent_expr to check instantiation_dependent_uneval_expression_p. But as the testcase below demonstrates, this predicate is too

[PATCH] c++: value-dep but not type-dep decltype operand [PR105756]

2022-06-01 Thread Patrick Palka via Gcc-patches
r12-7564-gec0f53a3a542e7 made us instantiate non-constant non-dependent decltype operands by relaxing instantiate_non_dependent_expr to check instantiation_dependent_uneval_expression_p. But as the testcase below demonstrates, this predicate is too permissive here because it allows