comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Bug or feature?
Date: Wed, 14 May 2014 16:48:19 -0500
Date: 2014-05-14T16:48:19-05:00	[thread overview]
Message-ID: <ll0ob6$pj1$1@loke.gir.dk> (raw)
In-Reply-To: 224148c3-2a31-4f3e-a3a3-0a588773798b@googlegroups.com

"Laurent" <daemon2@internet.lu> 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.


  parent reply	other threads:[~2014-05-14 21:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14 19:06 Bug or feature? Laurent
2014-05-14 19:57 ` Adam Beneschan
2014-05-14 20:15   ` Adam Beneschan
2014-05-14 21:24     ` Laurent
2014-05-14 21:37       ` Adam Beneschan
2014-05-14 22:02         ` Robert A Duff
2014-05-14 22:25           ` Adam Beneschan
2014-05-14 21:42       ` Robert A Duff
2014-05-15  8:51         ` Georg Bauhaus
2014-05-14 21:48       ` Randy Brukardt [this message]
2014-05-14 22:35         ` Robert A Duff
2014-05-15  8:23           ` Simon Wright
2014-05-15 18:21             ` Randy Brukardt
2014-05-15  8:58         ` Georg Bauhaus
2014-05-15 18:30           ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox