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!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!attbi_s71.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: What does -gnato do? References: <1636357.gWrtX1Nq9K@linux1.krischik.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.176 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s71 1156800938 12.201.97.176 (Mon, 28 Aug 2006 21:35:38 GMT) NNTP-Posting-Date: Mon, 28 Aug 2006 21:35:38 GMT Date: Mon, 28 Aug 2006 21:35:38 GMT Xref: g2news2.google.com comp.lang.ada:6422 Date: 2006-08-28T21:35:38+00:00 List-Id: 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