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.
Jonas _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel