This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Status of Ada in GCC?


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. :-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]