[fpc-devel] Dangerous optimization in CASE..OF

Ondrej Pokorny lazarus at kluug.net
Sun Jul 2 20:29:01 CEST 2017


On 02.07.2017 20:23, Florian Klämpfl wrote:
> And the compiler writes no warning during compilation?

It does indeed.

On 02.07.2017 20:18, Florian Klämpfl wrote:
> Yes, undefined behavior.

I think I got your point :) You are right, sorry for wasting your time.

If we get a convenient way to assign ordinal to enum with range checks, 
everything will be fine :)

Ondrej



More information about the fpc-devel mailing list