[fpc-devel] Data flow analysis (dfa) and "case ... of"
Denis Kozlov
dezlov at gmail.com
Mon Jun 5 20:37:18 CEST 2017
I just wanted to highlight that these cases as legal and I presume not
uncommon, particularly if values are deserialized and typecasted.
It seems that there is no way for compiler to know if the result has
indeed being initialized by reason of enumeration of valid values,
because one has also account for invalid values.
I think that compiler should always warn (as it does now) if result is
not initialized against all possible cases.
Denis
On 05/06/2017 18:59, Jonas Maebe wrote:
> 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