Re: What does -gnato do?
- From: "Peter C. Chapin" <pchapin@xxxxxxxxx>
- Date: 27 Aug 2006 11:12:55 GMT
Martin Krischik <krischik@xxxxxxxxxxxxxxxxxxxxx> wrote in
news:1636357.gWrtX1Nq9K@xxxxxxxxxxxxxxxxxxx:
-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
.
- Follow-Ups:
- Re: What does -gnato do?
- From: Stephen Leake
- Re: What does -gnato do?
- References:
- What does -gnato do?
- From: Peter C. Chapin
- Re: What does -gnato do?
- From: Martin Krischik
- What does -gnato do?
- Prev by Date: Re: What does -gnato do?
- Next by Date: Re: Simulating OS semaphore behavior
- Previous by thread: Re: What does -gnato do?
- Next by thread: Re: What does -gnato do?
- Index(es):
Relevant Pages
|