On 12/09/2016 11:33 AM, Paolo Carlini wrote:
this regression is caused by my fix for c++/60385, where I changed
push_namespace to early return (a bool) when pushdecl fails. In the
present testcase, a different push_namespace call in
cp_parser_namespace_definition, for nested namespace definitions,
fails, thus returns early, and that is inconsistent with the final
loop (pop_namespace ICEs):
/* Finish the nested namespace definitions. */
while (nested_definition_count--)
pop_namespace ();
To fix this problem, I think we can simply increment
nested_definition_count only when push_namespace succeeds. Tested
x86_64-linux.
Ok. (Looks sufficiently obvious to me.)
nathan
--
Nathan Sidwell