Gabriel Dos Reis <[email protected]> writes:
> We already have various predicates to test for constant
> expressions so I am uneasy to add yet another one.
I understand. I got lost in the number of existing predicates to test
for constant expressions, to the point that I thought (wrongly) the one
I wanted wasn't present. :-)
> I think reduced_constant_expression_p is what you want.
Thanks. I didn't realize this would work because the comment of
initializer_constant_valid_p (that it uses) says:
We assume that VALUE has been folded as much as possible
On a side node, as Jason said in the thread, we might not even need to
touch anything here, as check_instantiated_arg also assumes that its arg
has been fully folded. I guess I'll propose to update the comment of
that function to reflect that assumption.
Thanks.
--
Dodji