From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9591 invoked by alias); 3 May 2009 21:14:51 -0000 Received: (qmail 9583 invoked by uid 22791); 3 May 2009 21:14:50 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_33 X-Spam-Check-By: sourceware.org Received: from mailout08.t-online.de (HELO mailout08.t-online.de) (194.25.134.20) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 03 May 2009 21:14:45 +0000 Received: from fwd06.aul.t-online.de by mailout08.sul.t-online.de with smtp id 1M0j1G-0005J0-00; Sun, 03 May 2009 23:14:42 +0200 Received: from [192.168.178.27] (Gn96VkZJwhLu+oyJQCeBrzldmLl3gci+wnZmHzukwUWE2wvlxoUZ7E+6mImhqjKZST@[84.156.205.198]) by fwd06.aul.t-online.de with esmtp id 1M0j1E-20Fd8i0; Sun, 3 May 2009 23:14:40 +0200 Subject: Re: [gnat] reuse of ASTs already constructed From: oliver.kellogg@t-online.de (Oliver Kellogg) Reply-To: okellogg@users.sourceforge.net To: gcc@gcc.gnu.org In-Reply-To: <1240175954.4554.50.camel@tidbit.site> References: <1239557374.7565.37.camel@tidbit.site> <1240083309.4554.45.camel@tidbit.site> <1240175954.4554.50.camel@tidbit.site> Content-Type: text/plain Date: Sun, 03 May 2009 21:14:00 -0000 Message-Id: <1241385654.4763.38.camel@tidbit.site> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-05/txt/msg00048.txt.bz2 On 2009-04-19, at 23:19 +0200, Oliver Kellogg wrote: > [...] > > How about not doing the name expansion in-place but rather > storing the expanded name in an extra node field? I haven't received any reaction on this question yet. Perhaps I could reuse the Str3 field instead? (I haven't looked into the depths of its usage yet.) Please advise. BTW, I added the invocation of 'as' for assembly files 2 to N in gcc.c, this means that the multi-source mechanism can now be used in a normal "gcc -c" invocation using the -multi switch. Up next would be gnatmake: I would like to add a switch to gnatmake that enables multi- source mode. What should I use for the switch name? Also, I'm thinking that in multi-source mode, the switch "-o" can perhaps continue to be used - not by giving a filename but instead by giving a directory. All object files would then be placed in the given directory. What do you think? Thanks, Oliver > On 2009-04-18 at 21:35 +0200, Oliver Kellogg wrote: > > I've run up against a problem with reusing the GNAT trees: > > Apparently during semantic analysis entity names are expanded > > to their fully qualified names in the tree. > > > > For example, when compiling the following file with the node > > for System already installed by a previous compilation, > > > > -- file: ext.ads > > with System; > > procedure Ext (Addr : System.Address); > > > > I get the following error from sem_ch8.adb Find_Expanded_Name > > during semantic analysis of the above System.Address, > > > > ext.ads:3:29: "Address" is not a visible entity of "System" > > > > This is because in sem_ch8.adb:4482, > > > > if No (Id) or else Chars (Id) /= Chars (Selector) then ... > > > > the second part of the condition becomes true as Chars(Id) is > > "system__address" [and Chars(Selector) is "address"]. > > When compiling the same file afresh without preinstalled nodes, > > Chars(Id) is just "address" and all is fine. > > > > Oliver > >