gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] constant overflow error with MAX(INTEGER8)


From: Gaius Mulley
Subject: Re: [Gm2] constant overflow error with MAX(INTEGER8)
Date: Wed, 17 Mar 2010 19:10:55 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

SiTex Graphics <address@hidden> writes:

> Hi Gaius,
>
> The following code generates a 'constant overflow error' during compilation:
>
> MODULE test8;
>
> FROM SYSTEM IMPORT INTEGER8;
>
> VAR
>   i8 : INTEGER8;
> BEGIN
>   FOR i8:=MIN(INTEGER8) TO MAX(INTEGER8) DO
>   END;
> END test8.
>
> If MAX(INTEGER8) is changed to 127, the code compiles.

Hi Scott,

thanks for the bug report and test code - now fixed in the latest cvs:

    * gm2/gm2-compiler/M2ALU.def:  CheckOrResetOverflow
      (New procedure) replaces CheckOverflow.
    * gm2/gm2-compiler/M2ALU.mod:  implement
      CheckOrResetOverflow.
    * gm2/gm2-compiler/M2GenGCC.mod:  replace CheckOverflow
      with CheckOrResetOverflow.
    * gm2/gm2-compiler/M2Quads.def:  export and declare
      MustCheckOverflow (New procedure).
    * gm2/gm2-compiler/M2Quads.mod:  implement
      MustCheckOverflow.  Modify doBuildAssignment,
      doBuildBinaryOp to take an extra parameter, overflow.
      PutQuadO, GenQuadO (New procedures).
    * gm2/gm2/gm2-libs/RTint.mod:  turn off debugging.
    * gm2/gm2-libs-ch/sckt.c:  turn off debugging.
    * above changes fix bug reported by Scott Iverson
      <http://lists.gnu.org/archive/html/gm2/2010-03/msg00016.html>
    * gm2/gm2-compiler/M2ALU.mod:  corrected import (RemoveOverflow).

regards,
Gaius




reply via email to

[Prev in Thread] Current Thread [Next in Thread]