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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,57d25404e12d2837 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-01 06:18:51 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.bredband.com!bredband!uio.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: How to catch NaNs with gnat3.14p Date: Fri, 1 Feb 2002 14:18:51 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: References: NNTP-Posting-Host: kiuk0156.chembio.ntnu.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: tyfon.itea.ntnu.no 1012573131 4225 129.241.83.82 (1 Feb 2002 14:18:51 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Fri, 1 Feb 2002 14:18:51 +0000 (UTC) User-Agent: slrn/0.9.7.3 (Linux) Xref: archiver1.google.com comp.lang.ada:19469 Date: 2002-02-01T14:18:51+00:00 List-Id: On Fri, 1 Feb 2002 14:49:56 +0100, Alexander Boucke wrote: > Hello! > > One of the announced features of gnat3.14p is the ability to raise contraint > error, when NaN or Inf occures. But how to do it? I was not able to find [...] > > Did I miss something? I don't have 3.14p yes, so what does it say in the : Run-time Checks part of the GNAT User Guide? In 3.13p it says: `-gnato' Enables overflow checking for integer operations. This causes GNAT to generate slower and larger executable programs by adding code to check for both overflow and division by zero (resulting in raising `Constraint_Error' as required by Ada semantics). Note that the `-gnato' switch does not affect the code generated for any floating-point operations; it applies only to integer operations. For floating-point, GNAT has the `Machine_Overflows' attribute set to `False' and the normal mode of operation is to generate IEEE NaN and infinite values on overflow or invalid operations (such as dividing 0.0 by 0.0). -- Preben Randhol �For me, Ada95 puts back the joy in programming.�