This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: using directive patch
On Mon, 08 Sep 2008 17:15:24 +0200, Sami Wagiaalla wrote:
>> I expect that after fixing this GCC Bug the testcase included below (*1) will
>> fail due to the line `using_directives = NULL;' in finish_block() - IMO it
>> should restore (not reset) the original using-directives context. Due to the
>> GCC Bug the GDB Bug is not reproducible.
>
> Come to think of it I dont think that the line `using_directives =
> NULL;' is needed in finish_block(), but but I thought that the context
> is restored by the caller in this case, as the caller is the one who
> 'pops' the context (like the line 'using_directives =
> new->using_directives;' in read_func_scope). Same should be done for
> read_lexical_block_scope. Is this correct ?
I do not want to comment more without having a right DWARF at hand (either by
fixed GCC PR 37410 or fixed up for one testcase by hand).
Roughly I think using_directives should be rather updatedalready in
pop_context(). Moreover the variables local_symbols, param_symbols and
using_directives should be replaced by direct references to current
context_stack[context_stack_depth] (as suggested by Tom T.). But such cleanup
I find as an unrelated patch (which this namespaces fix may make sense to have
dependent on).
Regards,
Jan