FalsePositive W509 with goto

The following gives W509 unreachable code but if the result is put as the exit parameter then there is no warning.

function GoToError(const AValue: integer): double;
Label OnError;
begin
  if AValue = 0 then goto OnError;

  Result:= 1/AValue;
  exit;
//  exit(1/AValue);

OnError:
  Result:= 0;
  ShowMessage('Error');
end;

Nice catch! Will fix this.