On Mon, Jun 5, 2017 at 9:37 PM, Denis Kozlov <dez...@gmail.com> wrote:
> I just wanted to highlight that these cases as legal and I presume not
> uncommon, particularly if values are deserialized and typecasted.

No they are not legal. Why you write this nonsense?
Values outside the range dictated by the type system are always wrong.
No excuses, no exceptions.
For the purposes of DFA the compiler can always assume the values are in range.

- Later: -
> Complier currently warns (cares) about such execution flows
> which are triggered by invalid data, and I happen to find it useful :)

Again nonsense.
The range check -Cr warns about out-of-range data, yes, but this
thread is about DFA and not about range checks.
I feel you hijacked my DFA thread for your own purpose but I don't
really know what that purpose is.
Are you saying that typecasts should be forbidden to prevent range errors?
No, it would not prevent bugs in code.
Anyway, please start a new thread about range check issues.

Juha
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to