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

Marco van de Voort marcov at stack.nl
Thu Jun 29 14:30:25 CEST 2017

In our previous episode, Martin said:
> > Interestingly, I just ran into "bad" code generation with exactly the properties
> > discussed in this thread.
> > Because every declared element is covered, the generated code for it ends up
> > being a computed goto:
> > and most importantly, not into any else statement.
> No, it is not bad code generation.
> It is exactly the expected result. At least that is what I understood 
> from previous mails in this thread, specifically (in the context of 
> out-of-range input):

Afaik intermediate values in a sparse enum are not rangechecked at all? They
fall within the range (lowestvalue..highestvalue), but are not valid anyway.

More information about the fpc-devel mailing list