gm2
[Top][All Lists]
Advanced

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

[Gm2] negate whole number overflow detection implemented


From: Gaius Mulley
Subject: [Gm2] negate whole number overflow detection implemented
Date: Mon, 08 Jan 2018 11:13:15 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hello,

a small note to say that runtime checking of whole number overflow is
now implemented for the negate operator.  This works on subranges as
well as integers.  Currently committed on the master.  A simple obvious
example follows:

MODULE subrange ;

FROM libc IMPORT exit ;

VAR
   i: [-4..3] ;
BEGIN
   i := -4 ;
   i := -i ;
   exit(0)    (* should not get here if -fsoft-check-all is used *)
END subrange.

regards,
Gaius



reply via email to

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