[fpc-devel] [Patch/RFC] Warnings for (in/over)complete case statements
jonas at freepascal.org
Wed Jan 2 18:53:18 CET 2019
On 02/01/19 17:41, Martok wrote:
> Wait - why does that code not raise a 5033 "Function Result does not seem to be
> set"? Add a second property "Property MyOtherString : String Index 2 Read
> GetString;", and now its provably wrong. No warning. This seems wrong,
> considering what we just talked about on fpc-pascal.
It should print a warning if you compile with -Oodfa (or -O3, which
includes -Oodfa). Without data flow analysis, the compiler cannot check
whether the result is set on all possible paths, only whether it is set
on at least one path.
More information about the fpc-devel