Prev: Elaboration query
Next: Dhrystone
From: Robert A Duff on 23 Jul 2010 17:01 "Dmitry A. Kazakov" <mailbox(a)dmitry-kazakov.de> writes: >> Well, not really. If you don't say -gnato, then GNAT is implicitly >> assuming "pragma Suppress(Overflow_Check);". > > Objection. Ada compiler should not assume anything not explicitly > specified. I agree 100%. Overflow checks should be on by default, and you should have to do something explicit to turn them off. But we were talking about standard conformance, which is not quite the same as what compilers "should" do. >... Example: what about assuming > > raise Program_Error; > > at each even source line? Well, so long as there's an option to turn that malfeature off, it's standard conforming. But it's not a good idea, and the users of that compiler (if there are any) will complain loudly. ;-) - Bob P.S. I work for AdaCore, so I should note that my opinion that overflow checks should be turned on by default is my own personal opinion. AdaCore disagrees. The reason is that they are fairly expensive.
From: Peter C. Chapin on 23 Jul 2010 18:32 On 2010-07-23 17:01, Robert A Duff wrote: > P.S. I work for AdaCore, so I should note that my opinion > that overflow checks should be turned on by default is > my own personal opinion. AdaCore disagrees. The reason > is that they are fairly expensive. Isn't that hardware dependent (the expense, I mean)? My understanding was that one some architectures overflow checking could be done with minimal... even zero... impact on a correct program. Peter
From: BrianG on 23 Jul 2010 21:48 Robert A Duff wrote: > P.S. I work for AdaCore, so I should note that my opinion > that overflow checks should be turned on by default is > my own personal opinion. AdaCore disagrees. The reason > is that they are fairly expensive. I assume you mean that the checks are expensive? :-):-):-) (Sorry, I couldn't resist!) --I can learn to resist -- Anything but temptation --I can learn to co-exist -- With anything but pain --I can learn to compromise -- Anything but my desires --I can learn to get along -- With all the things I can't explain
From: Ada novice on 24 Jul 2010 06:30 On Jul 23, 10:52 pm, Robert A Duff <bobd...(a)shell01.TheWorld.com> wrote: > Simon Wright <si...(a)pushface.org> writes: > > Robert A Duff <bobd...(a)shell01.TheWorld.com> writes: > > >> Similarly, if you say "-gnatn", GNAT is implicitly including > >> "pragma Suppress(All_Checks);" as part of your program text. > So removing -gnatn is a good thing if one wants to enable checks? YC
From: Robert A Duff on 24 Jul 2010 08:03
Ada novice <posts(a)gmx.us> writes: > On Jul 23, 10:52�pm, Robert A Duff <bobd...(a)shell01.TheWorld.com> > wrote: >> Simon Wright <si...(a)pushface.org> writes: >> > Robert A Duff <bobd...(a)shell01.TheWorld.com> writes: >> >> >> Similarly, if you say "-gnatn", GNAT is implicitly including >> >> "pragma Suppress(All_Checks);" as part of your program text. > > So removing -gnatn is a good thing if one wants to enable checks? No. I meant -gnatp, not -gnatn. Sorry! - Bob |