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

Sven Barth pascaldragon at googlemail.com
Fri Jul 5 14:24:40 CEST 2019


Martok <listbox at martoks-place.de> schrieb am Fr., 5. Juli 2019, 11:10:

> Am 05.07.2019 um 02:52 schrieb Michael Van Canneyt:
>
> > With this sentence you forbid storing or communicating enumerated values
> in any way:
> > file, database, over network. It can be used only in a computer program
> and never
> > leave the context of the running program under any form. Because as soon
> as
> > it is somehow communicated, there is a chance it becomes invalid in
> return
> > communication.
>
> This is the conclusion from Jonas' arguments, which he explicitly
> confirmed when
> we had the discussion two+ years ago.
>
> You're also missing another important type of 'communication': calling
> non-FPC
> APIs or even just FPC libraries of possibly different version (see:
> Run-Time
> Packages!)
>
> Anything that even looks like a subrange cannot be used for these
> interfaces.
>

Huh? The comment regarding dynamic packages is nonsense. The compiler and
RTL check that the checksums of the involved interface sections match and
thus there is no problem there.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190705/069ddde4/attachment-0001.html>


More information about the fpc-devel mailing list