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!postnews1.google.com!not-for-mail From: aschwarz@acm.org (skidmarks) Newsgroups: comp.lang.ada Subject: Re: Semantics of Inline vs non-Inline Date: 15 Oct 2004 09:45:54 -0700 Organization: http://groups.google.com Message-ID: <35f054ea.0410150845.50a522ac@posting.google.com> References: <35f054ea.0410140733.5f250e6f@posting.google.com> <1427975.D57Qmkl0pE@linux1.krischik.com> <416F1EA4.5080700@acm.org> <6545303.EbTl0XcSZp@linux1.krischik.com> NNTP-Posting-Host: 12.72.61.253 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1097858755 21444 127.0.0.1 (15 Oct 2004 16:45:55 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 15 Oct 2004 16:45:55 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:5254 Date: 2004-10-15T09:45:54-07:00 List-Id: "Martin Krischik" wrote in message news:6545303.EbTl0XcSZp@linux1.krischik.com... > Arthur Schwarz wrote: > > > Martin Krischik wrote: > > > >> skidmarks wrote: > function Push( Datum : access Datum_Type ) return List.Cell_Ptr is > LM_Datum : List.Datum_Type; > for LM_Datum'Address use Datum.all'Address; > begin -- Push > return List.Push(LM_Datum); > end Push; > pragma inline( Push ); > > By passing an access you force the compiler to make sure an address is > available. A clue, a clue. Thank you. This (and the other suggestions by you and the other comp.lang.ada respondent) will be tried. Does this mean that I pass an access type or indicate, to the compiler, that the compiler should generate code such that a valid address is available? > > The non inlined version only works because you where luck. However, there is > just one thing where you should go back to your verndor and insist on a bug > to be fixed: PROGRAM_ERROR should have been raised. And most compilers > issue a warning when the code for PROGRAM_ERROR is generated. The vendor is in a state of denial. They deny that this is a bug (as, sigh, do you) and may well not see that if it is not a bug, then the application is due a diagnostic message. Sic caveat emptor. > > With Regards > > Martin Thank you. I don't like your answer (drat) but I'm equally sure it is correct. And you have provided fruitful ways for me to explore the underside of Ada and perhaps repair this error. (And I do apologize for misspelling, missgrammer, and all other miss's). art