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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!mx05.eternal-september.org!feeder.eternal-september.org!xmission!newsswitch.lcs.mit.edu!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Bug in 'gnatmake' (Was: Range check for type 'Integer') Date: Mon, 17 Jun 2013 12:50:06 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <7f33982d-3bcf-452e-a3b3-3a0a28505ff1@x20g2000vbe.googlegroups.com> <87r4g0g9c0.fsf@adaheads.sparre-andersen.dk> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1371487806 14501 192.74.137.71 (17 Jun 2013 16:50:06 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 17 Jun 2013 16:50:06 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:y133IqC3afy2+WjbG48GY84VRuk= Xref: news.eternal-september.org comp.lang.ada:15785 Date: 2013-06-17T12:50:06-04:00 List-Id: Jacob Sparre Andersen writes: > Because there is a major error in the design of GNAT. You have to give > 'gnatmake' a very specific set of command line flags to turn it into an > Ada compiler: > > -fstack-check -- Generate stack checking code > -gnata -- Enable assertions > -gnatE -- Dynamic elaboration checking > -gnato -- Overflow checking You should never use -gnatE, unless you are dealing with legacy code that that won't work without it, and you can't afford to fix the code. -fstack-check is the default, at least on the most popular targets. You usually want -g (debugging info). And the debugger works better if you turn off optimizations (-O0). - Bob