tw8151c.pp 338 B

1234567891011121314151617181920212223
  1. { %opt=-Oodfa -Sew -vw }
  2. { %fail }
  3. {$IFDEF FPC}
  4. {$mode delphi}
  5. {$ENDIF}
  6. program FunctionResultAnalysisWrong;
  7. uses
  8. SysUtils;
  9. var
  10. I : longint;
  11. function Test5: Integer;
  12. begin
  13. if i > 0 then
  14. Result := 0;
  15. end; {SHOULD generate "Warning: Function result does not seem to be set", does in delphi, not in FPC }
  16. begin
  17. i:=1;
  18. end.