This is the mail archive of the mailing list for the Archer project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: using directive patch

Thanks a lot for the comments

Jan Kratochvil wrote:

the patch did not apply for HEAD - the current GIT snapshot should be updated.
Fixed a real crash on missing imported `DW_AT_name', fixed a possible crash on
missing `DW_AT_import'.

Yeah I noticed that after I mailed the patch. Locally I used namespace_name()

Unfortunately it cannot work right as there is a GCC Bug I submitted now for `using namespace' inside blocks:

Good catch. I never noticed that before.

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 ?

There is also still missing the renaming support.

Thanks, Jan

(*1): At `break2' try to print `aaa'. ------------------------------------------------------------------------------ #include <stdio.h>

namespace A1
    int aaa = 1;
namespace A2
    int bbb = 2;

main (void)
  int x;
  using namespace A1;
  x = 0;

    using namespace A2;
    int block_create;

    block_create = bbb; /* break1 */
    printf ("%d\n", bbb);

printf ("%d\n", aaa); /* break2 */

  return 0;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]