This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Status of Ada in GCC?
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: dewar at gnat dot com (Robert Dewar)
- Cc: aj at suse dot de, bosch at gnat dot com, gcc at gcc dot gnu dot org
- Date: Mon, 23 Sep 2002 23:31:22 +0200
- Subject: Re: Status of Ada in GCC?
- References: <20020923212358.55534F2CEB@nile.gnat.com>
dewar@gnat.com (Robert Dewar) writes:
>> I'm not talking about shared generics. I'm talking about not
>> generating (and emitting) code for subprograms formally part of
>> generic instantiations which are never referenced (and known to be
>> unreferenced at compile time).
>
> gnatelim removes such unused subprograms
gnatelim is not part of GCC (neither is ASIS).
> We are not aware of any customers using this package, none of the sample
> code we have from customers uses it, and no customer has ever mentioned
> using it, or had any concerns about it.
This certainly explains why there is no demand for improvement of this
package. ;-)
> It sounds like you had a large number of instantiations of this package,
Actually, I hadn't, but ...
> and that indeed will generate piles of code. The proper approach in this
> case is to make these instantiations separate units, and then with the
> units as required, rather than put a whole lot of them in one package.
... I currently use something which is quite close to the original
proposal for ASB: no generics, but a record with a discriminant which
controls the maximum length. For each string length I need, I declare
a suitable subtype.
Of course, there's a nasty assignment problem (that's why this
approach was not chosen for ASB, I guess), but otherwise, I'm
happy. :-)