This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [gnat] reuse of ASTs already constructed
- From: oliver dot kellogg at t-online dot de (Oliver Kellogg)
- To: gcc at gcc dot gnu dot org
- Date: Sun, 03 May 2009 23:20:54 +0200
- Subject: Re: [gnat] reuse of ASTs already constructed
- References: <1239557374.7565.37.camel@tidbit.site> <1240083309.4554.45.camel@tidbit.site> <1240175954.4554.50.camel@tidbit.site>
- Reply-to: okellogg at users dot sourceforge dot net
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
> >