From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10242 invoked by alias); 8 Sep 2008 15:16:27 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 10230 invoked by uid 22791); 8 Sep 2008 15:16:24 -0000 X-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,KAM_MX,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <48C5418C.8060300@redhat.com> Date: Mon, 08 Sep 2008 15:16:00 -0000 From: Sami Wagiaalla User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: Jan Kratochvil CC: Project Archer Subject: Re: using directive patch References: <48BED230.1070209@redhat.com> <20080907183612.GA7304@host0.dyn.jankratochvil.net> In-Reply-To: <20080907183612.GA7304@host0.dyn.jankratochvil.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-SW-Source: 2008-q3/txt/msg00184.txt.bz2 Thanks a lot for the comments Jan Kratochvil wrote: > Hi, > > 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: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37410 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 > > namespace A1 > { > int aaa = 1; > }; > namespace A2 > { > int bbb = 2; > }; > > int > 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; > } > ------------------------------------------------------------------------------ >