For some reason my reply went only to Denis first. Another try here... On Mon, Jun 5, 2017 at 7:46 PM, Denis Kozlov <dez...@gmail.com> wrote: > Result is undefined if caller passes an out of range value. > An example: TControlBorderSpacing.GetSpace(TAnchorKind(-1)); > Result is indeed not initialized, so silencing this message may be harmful.
Yes but that is an illegal situation. It is already trapped by range check -Cr. The compiler can safely assume that such situation does not happen. Actually the compiler already assumes that in other situations. I remember a bug years ago in Lazarus, caused by an out of range enum value. FPC had changed its behavior and the bug got triggered. Juha _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel