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.1 required=5.0 tests=AXB_XMAILER_MIMEOLE_OL_024C2, BAYES_00,MAILING_LIST_MULTI,REPLYTO_WITHOUT_TO_CC autolearn=no 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:52:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!193.174.75.178!news-fra1.dfn.de!newsfeed.hanau.net!fr.clara.net!heighliner.fr.clara.net!teaser.fr!enst!enst.fr!not-for-mail From: "David C. Hoos, Sr." Newsgroups: comp.lang.ada Subject: Re: Exceptions in GNAT Date: Sun, 2 Jun 2002 07:26:02 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: <3CF9FB01.2070101@yahoo.com> Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1023022323 30420 137.194.161.2 (2 Jun 2002 12:52:03 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Sun, 2 Jun 2002 12:52:03 +0000 (UTC) Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.8 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:25198 Date: 2002-06-02T07:26:02-05:00 ----- Original Message ----- From: "David Rasmussen" Newsgroups: comp.lang.ada To: Sent: Sunday, June 02, 2002 6:01 AM Subject: Exceptions in GNAT > 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? > The answers to "how to" questions for GNAT are all contained in the documentation with GNAT. If you don't have that, it's downloadable from ftp.cs.nyu.edu/pub/gnat/3.14p for whatever platform you're using. E.g., the question about numeric overflow checking is answered by a search for "numeric overflow" in the GNAT User's Guide.