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!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Running a preprocessor from GPS? Date: Wed, 29 Jul 2015 11:49:00 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <1ckwx9hern944$.1w0k6fbvlqo62$.dlg@40tude.net> <1ipfeas9434z5.o8661mp0cpkh.dlg@40tude.net> <75a31df9-801e-4e7f-8e29-403c0650c891@googlegroups.com> <53238a9a-1b46-457a-98d7-29d8db4ce165@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Wed, 29 Jul 2015 18:47:28 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="ee44d3db9c41f5ad88d7e8e8f0268f05"; logging-data="3927"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/8l5i77Jn6vcyKZWkBTSkjMp0rTr+Z89E=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: X-Mozilla-News-Host: news://freenews.netfront.net Cancel-Lock: sha1:FG0AQGNuopNGYTh4raoVeN/jv/c= Xref: news.eternal-september.org comp.lang.ada:27139 Date: 2015-07-29T11:49:00-07:00 List-Id: On 07/29/2015 10:30 AM, Stefan.Lucks@uni-weimar.de wrote: > > But usually, the maintainers of Ada compilers try to avoid stupid behavior. A > compiler is not required to support inlining and dead code elimination -- and I > seem to recall that gnat needs to be "pushed" doing that by turning on > optimization (at least -O1). But when a compiler does inlining and dead code > elimination at all, I would be shocked if it would not actually inline and > eliminate where this is obvioulsly applicable, as in the Debug.Trace example. A compiler that doesn't consistently inline trivial subprograms like the example when asked to probably wouldn't get many users. GNAT is usually pretty good about inlining if you give it the -gnatn option. It also has a non-standard pragma Inline_Always, which inlines even if the -gnatn option isn't used. -- Jeff Carter "Whatever it is, I'm against it." Horse Feathers 46