[fpc-devel] [Suggestion] Enumeration range-check intrinsic

Sven Barth pascaldragon at googlemail.com
Tue Jul 16 11:15:31 CEST 2019


Michael Van Canneyt <michael at freepascal.org> schrieb am Mo., 15. Juli 2019,
23:50:

>
>
> On Mon, 15 Jul 2019, Ben Grasset wrote:
>
> > On Mon, Jul 15, 2019 at 5:23 PM Sven Barth via fpc-devel <
> > fpc-devel at lists.freepascal.org> wrote:
> >
> >> That is exactly what is happening if you have a specialization in
> multiple
> >> units that don't know about each other.
> >>
> >
> > At what point are they being removed so that the executable is not
> > comically large, then? Is it on the FPC side, or the linker side? Or a
> bit
> > of both perhaps?
>
> As far as I know, they are not. I believe that when specializing, the
> compiler checks if an identical specialization is in scope:
> if so, it uses that. If not, a duplicate is made.
>
> As far as I know, Delphi behaves the same.
>

Delphi changed this in one of the newer versions. That's also when the
behavior of class variables in generics changed.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190716/1be34f5b/attachment.html>


More information about the fpc-devel mailing list