On 06/04/2012 08:40 PM, Jason Merrill wrote:
On 06/04/2012 06:36 AM, Florian Weimer wrote:
(Sorry if Thunderbird has garbled the changelog entries.)

I add the ChangeLog to the top of the patch to avoid this. :)

Good idea.

- if (TREE_CODE (w) != INTEGER_CST)
+ if (w == error_mark_node)
+ ; /* Continue with error processing below. */
+ else if (TREE_CODE (w) != INTEGER_CST)

- error ("enumerator value for %qD is not an integer constant",
- name);
+ if (value != error_mark_node)
+ error ("enumerator value for %qD is not an integer constant",
+ name);

Hmm, I don't see these errors as redundant, but rather as giving context
for the previous error.

Even with caret diagnostics? Anyway, I will try to resolve this in a different way.

+ else if (!parser->integral_constant_expression_p
+ && !parser->non_integral_constant_expression_p)
+ expression = error_mark_node;

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.

--
Florian Weimer / Red Hat Product Security Team

Reply via email to