comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org>
Subject: Re: What does -gnato do?
Date: Mon, 28 Aug 2006 21:35:38 GMT
Date: 2006-08-28T21:35:38+00:00	[thread overview]
Message-ID: <KkJIg.113678$FQ1.21077@attbi_s71> (raw)
In-Reply-To: <uhczxyt9o.fsf@stephe-leake.org>

Stephen Leake wrote:
> 
> Which is why standard Ada does not allow such behavior. GNAT without
> -gnato is _not_ a standard Ada compiler!

I think you also need -f stack-check. Technically, -gnatE may be 
required, but if GNAT will link your program without it, it doesn't 
really matter.

> In defense of GNAT, specifying -gnato does add size to the code, and
> it runs somewhat slower. Back when GNAT was first introduced, there
> were lots of rumors about how slow and bloated Ada is. So AdaCore made
> the decision to opt for speed and small size by default, rather than
> complete Ada correctness. A lot of us complained about that, but it's
> too late to complain about it now.

IIRC, at the time, on at least one popular processor, overflow checks 
were very slow. That led to the decision. The checks are no longer 
exceptionally expensive, but the default remains the same.

-- 
Jeff Carter
"You tiny-brained wipers of other people's bottoms!"
Monty Python & the Holy Grail
18



  reply	other threads:[~2006-08-28 21:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-26 22:52 What does -gnato do? Peter C. Chapin
2006-08-27  1:51 ` Jeffrey R. Carter
2006-08-27  8:55 ` Martin Krischik
2006-08-27 11:12   ` Peter C. Chapin
2006-08-28 11:49     ` Stephen Leake
2006-08-28 21:35       ` Jeffrey R. Carter [this message]
2006-09-05 23:37       ` 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