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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4c1892715ffb825c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-02 05:39:42 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!opentransit.net!news.tele.dk!small.news.tele.dk!193.162.153.118!news.tele.dk!not-for-mail Message-ID: <3CFA120E.4080508@yahoo.com> Date: Sun, 02 Jun 2002 14:39:42 +0200 From: David Rasmussen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020412 Debian/0.9.9-6 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Exceptions in GNAT References: <3CF9FB01.2070101@yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: TDC Internet NNTP-Posting-Host: 195.215.62.2 X-Trace: 1023021582 dtext.news.tele.dk 58779 195.215.62.2 X-Complaints-To: abuse@post.tele.dk Xref: archiver1.google.com comp.lang.ada:25196 Date: 2002-06-02T14:39:42+02:00 List-Id: Preben Randhol wrote: > On Sun, 02 Jun 2002 13:01:21 +0200, David Rasmussen wrote: > >>I am learning Ada, and in one exercise I am told to find out how large >>and integer I can use on my system, before it overflows. The exercise >>just tells me to add two larger and larger numbers and see when an >>exception occurs. I have just compiled my program with gnatmake with no >>options, and I am using gcc 3.1 . When the numbers get large enough, the >>result is just a negative number because of wrap-around. Shouldn't I get >>an exception, unless I turn it off? How do I compile for with most >>checks for debug builds, and how do I compile with everything turned off >>for performance intensive release builds? > > > First you made a very good choice with Ada :-) > I think so too :) > I would recommend that you use the gnat 3.14p compiler instead. The > reason is that the gcc 3.1 is very fresh and the compiler is reported to OK, I have both of them installed. > have some problems. So as you now learn Ada I think you can get > seriously confused if you stumble over these bugs. At least use both and > if you see a difference you can report it. > I will try it. > Which platform do you use? > Linux. More precisely, Debian. /David