[fpc-devel] Data flow analysis (dfa) and "case ... of"

Jonas Maebe jonas at freepascal.org
Mon Jun 5 19:59:53 CEST 2017

On 05/06/17 19:39, Denis Kozlov wrote:
> I have just created a new GUI application, enabled range checking "-Cr" 
> and executed the following:
> ShowMessage(IntToStr(Form1.BorderSpacing.GetSpace(TAnchorKind(-1))));
> The displayed value is a semi-random integer. No compiler errors or 
> run-time errors.

That is why I said "If range checking is off there or disabled via an 
explicit type cast, then the result is undefined by definition." You use 
an explicit typecast above.


More information about the fpc-devel mailing list