From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3b322104ceea062d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!transit3.readnews.com!news-out.readnews.com!news-out.readnews.com!postnews3.readnews.com!not-for-mail Newsgroups: comp.lang.ada Subject: Re: What does -gnato do? From: "Peter C. Chapin" References: <1636357.gWrtX1Nq9K@linux1.krischik.com> Organization: Kelsey Mountain Software Message-ID: User-Agent: Xnews/5.04.25 Date: 27 Aug 2006 11:12:55 GMT NNTP-Posting-Host: bdef5289.news.sover.net X-Trace: DXC=:]hnT7AnPEobZ<<3De[fciK6_LM2JZB_cQg3QD84dGBj3?@`i3kGa5kY;`UlZ5FJma3SVQf7NgYbn X-Complaints-To: abuse@sover.net Xref: g2news2.google.com comp.lang.ada:6406 Date: 2006-08-27T11:12:55+00:00 List-Id: Martin Krischik 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