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,1676be4fafed1dbb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!newsfeed.pionier.net.pl!news.nask.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: Wojtek Narczynski Newsgroups: comp.lang.ada Subject: Re: Semantics of Inline vs non-Inline Date: Thu, 14 Oct 2004 18:14:22 +0200 Organization: tp.internet - http://www.tpi.pl/ Message-ID: References: <35f054ea.0410140733.5f250e6f@posting.google.com> NNTP-Posting-Host: avn53.neoplus.adsl.tpnet.pl Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: nemesis.news.tpi.pl 1097770679 27049 83.27.47.53 (14 Oct 2004 16:17:59 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Thu, 14 Oct 2004 16:17:59 +0000 (UTC) User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Xref: g2news1.google.com comp.lang.ada:5204 Date: 2004-10-14T18:14:22+02:00 List-Id: Hello, > Any idea which view is the correct one? I would say - neither. Optimizations (pragma inline is supposed to be one) sometimes do change the behavior of the program. For example on x86 you can get different floating point results, depending on the optimization level, and that's legal and logical. But in this case, if the compiler is unable to do both (pragma Inline, and for X'Address) it should tell you about it, not fail at runtime. I think that using Unchecked_Conversion, instead of (ab)using 'Address rep clause, will fix the problem. Oh, and why is Push a function? Finally, inlining is often counter-productive, because it causes code size explosion, which in turn causes CPU cache hit ratio degradation. Regards, Wojtek