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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.stack.nl!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Bug or feature? Date: Wed, 14 May 2014 16:48:19 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <50562e0a-3dfa-44c4-9aaa-70cbe304b54b@googlegroups.com> <40c7405d-c4c2-4163-a430-01052b769866@googlegroups.com> <049c868a-e930-4e5d-a96a-611542cd1ce6@googlegroups.com> <224148c3-2a31-4f3e-a3a3-0a588773798b@googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1400104102 26209 69.95.181.76 (14 May 2014 21:48:22 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 14 May 2014 21:48:22 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:19833 Date: 2014-05-14T16:48:19-05:00 List-Id: "Laurent" wrote in message news:224148c3-2a31-4f3e-a3a3-0a588773798b@googlegroups.com... ... >Checked the Stack Overflow check (-gnato) under Project >Properties/Switches/Ada and >disabling my own overflow detection the fibonacci program(iteration or >recursion) crashes >with Constraint Error. The behavior I expected. I am a bit >disappointed/afraid of this. Or >perhaps I have forgotten to read the small printed text somewhere at the >end :) To get what the Ada Standard calls "standard mode" for Ada with GNAT, you need to compile with a bunch of options. The default behavior of GNAT is NOT standard mode as described in the RM. To compile ACATS tests in GNAT, I have to use a small boatload of options: gnatmake C457003.adb -eS -gnat12 -O0 -gnatE -gnato -gnatv -gnatws -gnatd7 -bargs - T0 Some of these are about warnings and disabling of optimizations, and of course -gnat12 sets Ada 2012 mode (which I think is the default these days). [B-Tests also need -gnatf and -gnatq, but that's not important to most since they're not worried about broken programs.] I use that set of options anytime I'm compiling test programs from GNAT (including the ones that appear here), because several of them are needed to get standard behavior. GNAT's default behavior might be "better" in some ways, but it's confusing because it doesn't necessarily do what you'll find in an Ada book. Randy.