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

fredvs fiens at hotmail.com
Thu Mar 12 15:55:22 CET 2020


> which will make it always true. I see no reason for that "if" to exists
> at least not with out the code. 

Yes I know, it is strange.

But, like explained Roland Chastain in a other topic:

> With FPC 3.0.4, the following code compiles without warning and works:

>type
>  tabulatorkindty = (ak_left, tak_right, tak_centered, tak_decimal);
 
> var
>  kind: tabulatorkindty;
   
> begin
>  kind := tabulatorkindty(-1);
>  if kind = tabulatorkindty(-1) then
>    WriteLn('hello');
> end. 

fpc <= 3.0.4 accept it, without any warnings.

It is fpc 3.2.0 that reveals it and gives warnings ( and that can be
considered, imho, as a bug).

Fre;D






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


More information about the fpc-pascal mailing list