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,4c1892715ffb825c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-02 05:28:35 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.tele.dk!small.news.tele.dk!128.39.3.168!uninett.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: Exceptions in GNAT Date: Sun, 2 Jun 2002 12:28:35 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: References: <3CF9FB01.2070101@yahoo.com> 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 1023020915 17590 129.241.83.82 (2 Jun 2002 12:28:35 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Sun, 2 Jun 2002 12:28:35 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:25194 Date: 2002-06-02T12:28:35+00:00 List-Id: 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 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 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. Which platform do you use? Preben Randhol ------------------- http://www.pvv.org/~randhol/ -- �For me, Ada95 puts back the joy in programming.�