[fpc-pascal] New Warnings with fpc >= 3.2.0 (fredvs)

fredvs fiens at hotmail.com
Sat Mar 14 15:18:25 CET 2020

>Note that if you depend on this technique you should add a comment where the
type is defined that the order of the items is
> significant so that someone in the future does not change the order out of
> ignorance!

Yes, that is the main problem.
If you do it the "logical" way, placing at first without initialization,
when ord(kind) is used in code, because the order has changed, lot of code
must be re-written.

But if you place it at last you only have to initialize at creation with
nk_none and replace all use of "high(enumty)" by the last - 1 item of the


Many thanks ;-)
Sent from: http://free-pascal-general.1045716.n5.nabble.com/

More information about the fpc-pascal mailing list