[fpc-devel] Dangerous optimization in CASE..OF

Ondrej Pokorny lazarus at kluug.net
Fri Apr 13 21:16:01 CEST 2018


On 13.04.2018 14:08, Sven Barth via fpc-devel wrote:
> Ondrej Pokorny <lazarus at kluug.net <mailto:lazarus at kluug.net>> schrieb 
> am Fr., 13. Apr. 2018, 12:52:
>
>     I introduced the AS operator for enumerations in
>     https://bugs.freepascal.org/view.php?id=33603
>
>
> What about enums with holes?

No problem because Low() and High() work with these enums as well. See 
the test case project I attached to the bug report - it has a test with 
such an enum.

> Also for constants there could be a compile time check.

That's true. You are welcome to improve the patch :)

Ondrej

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20180413/815fabf7/attachment.html>


More information about the fpc-devel mailing list