This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Status of Ada in GCC?
- From: dewar at gnat dot com (Robert Dewar)
- To: dewar at gnat dot com, fw at deneb dot enyo dot de
- Cc: aj at suse dot de, bosch at gnat dot com, gcc at gcc dot gnu dot org
- Date: Mon, 23 Sep 2002 17:23:58 -0400 (EDT)
- Subject: Re: Status of Ada in GCC?
> 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
> Not only would this reduce executable size considerably (I think you
> can already use pragma Eliminate for that), compile time would benefit
> a lot as well. During my first Ada experiments, the required compile
> time was so *huge* that I avoided the package completely. (Have you
> ever asked your customers if they use more than one instantiation of
> this generic per compilation unit?)
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.
It sounds like you had a large number of instantiations of this package,
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.