tw8151b.pp 355 B

12345678910111213141516171819202122
  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 Test3: Integer;
  12. begin
  13. if i > 0 then
  14. raise Exception.Create('')
  15. end; {SHOULD generate "Warning: Function result does not seem to be set", and does in both delphi and FPC}
  16. begin
  17. i:=1;
  18. end.