[fpc-pascal] New Warnings with fpc >= 3.2.0

fredvs fiens at hotmail.com
Wed Mar 11 11:15:50 CET 2020


Compiling that code with fpc 3.2.0 gives the warning that follows:

--->  if (kind <> tabulatorkindty(-1)) --> gives now the warning:

"msedrawtext.pas(1115,48) Warning: range check error while evaluating
constants (-1 must be between 0 and 3)"

tabulatorkindty is declared as:

---> tabulatorkindty = (tak_left,tak_right,tak_centered,tak_decimal);

So, if I understand ok, with new feature of fpc, "-1" is no more permitted.

What must be changed, a new constant should be added at end of the array,
something like:

---> tabulatorkindty = (tak_left,tak_right,tak_centered,tak_decimal,


And then use:

--->  if (kind <> tabulatorkindty(tak_none) ?

Or do you have a other idea?



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

More information about the fpc-pascal mailing list