From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: f849b,b8d52151b7b306d2 X-Google-Attributes: gidf849b,public X-Google-Thread: 103376,a00006d3c4735d70 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-13 07:19:13 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.arch.embedded,comp.lang.ada Subject: Re: Certified C compilers for safety-critical embedded systems Followup-To: comp.arch.embedded,comp.lang.ada Date: Mon, 12 Jan 2004 17:29:19 +0100 Organization: AdaCL Message-ID: <3937370.JJaIY0lcS8@linux1.krischik.com> References: <3fe00b82.90228601@News.CIS.DFN.DE> <3ff18d4d.603356952@News.CIS.DFN.DE> <1731094.1f7Irsyk1h@linux1.krischik.com> <3ff1b8ef.614528516@News.CIS.DFN.DE> <3FF1E06D.A351CCB4@yahoo.com> <3ff20cc8.635997032@News.CIS.DFN.DE> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8Bit X-Trace: news.t-online.com 1074007110 07 14012 NbTOG2n14wCjGmV 040113 15:18:30 X-Complaints-To: usenet-abuse@t-online.de X-ID: r2Dc3BZEZeTNjkMxATALKwgfEYEbNmLTdtbW-NabaTiygWeqOgdnQm User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.arch.embedded:7416 comp.lang.ada:4366 Date: 2004-01-12T17:29:19+01:00 List-Id: Robert I. Eachus wrote: > error by bounding the terms if one gets too large.��In�this�case�once > you get past 2**32 subtracting one can't bring the final result back in > range, so you can declare an error and give up. $ gnat standard package Standard is pragma Pure(Standard); type Boolean is (False, True); type Integer is range -(2 ** 31) .. +(2 ** 31 - 1); subtype Natural is Integer range 0 .. +(2 ** 31 - 1); subtype Positive is Integer range 1 .. +(2 ** 31 - 1); type Short_Short_Integer is range -(2 ** 7) .. +(2 ** 7 - 1); type Short_Integer is range -(2 ** 15) .. +(2 ** 15 - 1); type Long_Integer is range -(2 ** 31) .. +(2 ** 31 - 1); type Long_Long_Integer is range -(2 ** 63) .. +(2 ** 63 - 1); I don't think GNAT will give up at 2**32. With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com