On Sun, May 10, 2009 at 07:56,  <domini...@savagesoftware.com.au> wrote:
> Hi all,
>  I just grabbed the latest SVN - 19889 and a build of bigide is not
> working.
> The error occuring is...
>
> Free Pascal Compiler version 2.3.1 [2009/05/09] for powerpc
> Copyright (c) 1993-2009 by Florian Klaempfl
> Target OS: Darwin for PowerPC
> Compiling tachartlazaruspkg.pas
> Compiling taseries.pas
> Compiling tagraph.pas
> tagraph.pas(1368,40) Error: range check error while evaluating constants
> tagraph.pas(1368,50) Error: range check error while evaluating constants
> tagraph.pas(1503) Fatal: There were 2 errors compiling module, stopping

The line in question contains
DoubleRect(Infinity, Infinity, NegInfinity, NegInfinity)
call, so range check error makes some sense.
Still, I think it is a compiler bug, especially since an absurd
attached patch fixes it.

If FPC developers think the range check is correct,
then it should be disabled for this one line and returned to
"previous" state afterwards --
is there a way to do this?

Cc'ing fpc-devel list.

-- 
Alexander S. Klenin
Index: tagraph.pas
===================================================================
--- tagraph.pas	(revision 19825)
+++ tagraph.pas	(working copy)
@@ -1359,13 +1359,15 @@
 
   end;
 
+const
+  ninf: Double = NegInfinity;
+  inf: Double = Infinity;
 var
   i: Integer;
 begin
   if FIsZoomed then exit;
   Extent.CheckBoundsOrder;
-
-  FCurrentExtent := DoubleRect(Infinity, Infinity, NegInfinity, NegInfinity);
+  FCurrentExtent := DoubleRect(inf, inf, ninf, ninf);
   for i := 0 to SeriesCount - 1 do
     with Series[i] do
       if Active then
_______________________________________________
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to