From: "Peter C. Chapin" <pchapin@sover.net>
Subject: Re: What does -gnato do?
Date: 27 Aug 2006 11:12:55 GMT
Date: 2006-08-27T11:12:55+00:00 [thread overview]
Message-ID: <Xns982C496A2A3B6pchapinsovernet@198.186.192.137> (raw)
In-Reply-To: 1636357.gWrtX1Nq9K@linux1.krischik.com
Martin Krischik <krischik@users.sourceforge.net> wrote in
news:1636357.gWrtX1Nq9K@linux1.krischik.com:
> -gnato enables runtime checks but the warning results from a compile
> time check. The ability to make quite a lot of checks at compile time
> - rather then runtime - is a is one great advantage of the Ada Syntax
> and Sematic:
You are right in that if I do the overflow with values that can only be
known at run time, the -gnato makes a difference. Without the option,
the results wrap around but with the option I get Constraint_Error.
So it seems that without -gnato the externally visible behavior of a
program depends on the extent with which the compiler can analyze the
code. If the compiler's analysis is sufficiently deep I might end up
with a Constraint_Error that I wouldn't get if the analysis was not as
deep. I'm not sure how I feel about that. It seems like a bad idea to me
although I can't articulate exactly why I feel that way.
Peter
next prev parent reply other threads:[~2006-08-27 11:12 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 [this message]
2006-08-28 11:49 ` Stephen Leake
2006-08-28 21:35 ` Jeffrey R. Carter
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