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-Thread: 103376,75f197493b7ab882 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!postnews.google.com!i20g2000prf.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Forcing exceptions on NANs with GNAT? Date: Thu, 20 Nov 2008 08:19:56 -0800 (PST) Organization: http://groups.google.com Message-ID: <529a1ef9-2ecc-402f-bec0-f227851af457@i20g2000prf.googlegroups.com> References: NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1227197996 8551 127.0.0.1 (20 Nov 2008 16:19:56 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 20 Nov 2008 16:19:56 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: i20g2000prf.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:2716 Date: 2008-11-20T08:19:56-08:00 List-Id: On Nov 20, 3:09 am, Markus Schoepflin wrote: > Platform: Linux > Compiler: GCC/GNAT 3.4.3 > > Hello, > > is it possible to influence the behaviour of GNAT regarding the handling of > NANs? (Most importantly in the special case of division by zero.) > > We need to get exceptions whenever a NAN is generated, is this possible > somehow? (For example by setting Machine_Overflow to True and recompiling > the compiler itself.) I really don't know that much about GNAT, but do those operations cause SIGFPE signals to be generated, and if so, can they be caught by an interrupt handler (see C.3)? And can that handler raise an exception that is propagated to the program (task) that performed the operation? -- Adam