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

Sven Barth pascaldragon at googlemail.com
Sun Jul 14 03:01:42 CEST 2019


Ben Grasset <operator97 at gmail.com> schrieb am Sa., 13. Juli 2019, 21:52:

> On Sat, Jul 13, 2019 at 3:47 PM Michael Van Canneyt <
> michael at freepascal.org> wrote:
>
>> No doubt, but this will lead to a bloated binary. I want less code (both
>> source and assembler), not more.
>>
>
> Well, it would be one instantiation per unique type it was used on.
>

Not necessarily. If you have two units that don't know about each other
that specialize the function with the same enum then you'd have two
specializations already.

This would need either a WPO pass or COMDAT support. Both are on my ToDo
list, especially as the former is needed if the output format does not
support the idea of COMDATs (e.g. PE/COFF and ELF do).

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190714/48202134/attachment.html>


More information about the fpc-devel mailing list