Re: [PATCH] c++: sizeof(expr) in non-templated requires-expr [PR108563]

2023-02-14 Thread Jason Merrill via Gcc-patches
On 2/9/23 10:22, Patrick Palka wrote: On Thu, 9 Feb 2023, Patrick Palka wrote: When substituting into sizeof(expr), tsubst_copy_and_build elides substitution into the operand if args is NULL_TREE, and instead considers the TREE_TYPE of the operand. But here the (templated) operand is a

Re: [PATCH] c++: sizeof(expr) in non-templated requires-expr [PR108563]

2023-02-09 Thread Patrick Palka via Gcc-patches
On Thu, 9 Feb 2023, Patrick Palka wrote: > When substituting into sizeof(expr), tsubst_copy_and_build elides > substitution into the operand if args is NULL_TREE, and instead > considers the TREE_TYPE of the operand. But here the (templated) > operand is a TEMPLATE_ID_EXPR with empty TREE_TYPE,

[PATCH] c++: sizeof(expr) in non-templated requires-expr [PR108563]

2023-02-09 Thread Patrick Palka via Gcc-patches
When substituting into sizeof(expr), tsubst_copy_and_build elides substitution into the operand if args is NULL_TREE, and instead considers the TREE_TYPE of the operand. But here the (templated) operand is a TEMPLATE_ID_EXPR with empty TREE_TYPE, so we can't elide substitution in this case.