On 06/04/2012 04:12 PM, Florian Weimer wrote:
This doesn't make sense to me. parser->integral_constant_expression_p
should always be true at this point if you're moving the restore later
(which also seems unnecessary).
I think parser->integral_constant_expression_p reflects the result of
the cp_parser_assignment_expression() call earlier in this function.
parser->integral_constant_expression_p is set to indicate that the
current context expects an integral constant expression; the call to
cp_parser_assignment_expression will not affect that.
If the expression turns out not to be a valid constant expression, then
we set parser->non_integral_constant_expression_p to true, but we don't
touch parser->integral_constant_expression_p. I think the condition you
want is
if (parser->non_integral_constant_expression_p
&& !allow_non_constant_p)
Jason