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!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Running a preprocessor from GPS? Date: Wed, 29 Jul 2015 15:40:05 -0500 Organization: Jacob Sparre Andersen Research & Innovation 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> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1438202407 1117 24.196.82.226 (29 Jul 2015 20:40:07 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 29 Jul 2015 20:40:07 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:27152 Date: 2015-07-29T15:40:05-05:00 List-Id: Jeffrey R. Carter" wrote in message news:mpb73u$3qn$2@dont-email.me... ... > 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. Janus/Ada doesn't support Inline at all. Whether or not that is a counter-example I'll leave to your imagination. [Why didn't we support Inline? Because it added compilation dependencies, and with compilations taking 5 minutes a unit on early PCs, we didn't support any additional compilation dependencies -- we wanted code to be changable without hours of compilation. That was the original reason why we implemented generics using code sharing, too. That led to a compiler architecture which has no way to create a body dependency (outside of one's own spec). Besides, a compiler has a better idea of what can and should be inlined than a programmer. It's completely silly to have to specify something that should be done always if possible. To me, it would make more sense to specify the amount of code expansion allowed (on a range of none to unlimited) and let the compiler do the best job possible within those constraints. But sadly, that's too weird for most.] Randy. Randy.