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,c6acbb9f2027b8c9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread3.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: volatile vs aliased References: <1128525722.605730.281980@g43g2000cwa.googlegroups.com> <87mzlnomca.fsf@ludovic-brenta.org> <1128537566.929419.121660@g14g2000cwa.googlegroups.com> <874q7voigp.fsf@ludovic-brenta.org> In-Reply-To: <874q7voigp.fsf@ludovic-brenta.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Thu, 06 Oct 2005 18:32:57 GMT NNTP-Posting-Host: 67.3.218.218 X-Complaints-To: abuse@earthlink.net X-Trace: newsread3.news.pas.earthlink.net 1128623577 67.3.218.218 (Thu, 06 Oct 2005 11:32:57 PDT) NNTP-Posting-Date: Thu, 06 Oct 2005 11:32:57 PDT Xref: g2news1.google.com comp.lang.ada:5457 Date: 2005-10-06T18:32:57+00:00 List-Id: Ludovic Brenta wrote: > type Parameter_Type is limited private; -- [1] I'd probably use unknown discriminants (<>) here, since you don't create any objects of the type. > [1] I think the type has to be declared limited, so that it is always > passed by reference to Call_Procedure. This guarantees that the > parameter has an address, and is not in a register. I have not > compiled or tried this code, so please take it with due care. For a generic formal type, limited only means that the generic cannot use ":=", "=", or "/=" for the type. The pass-by-reference limited-ness depends on the full type definition of the actual; nothing prevents the actual for Parameter_Type from being an elementary type, which are pass-by-copy. I don't know of any way to ensure that a generic formal type is pass-by-reference except to make it tagged. -- Jeff Carter "I soiled my armor, I was so scared." Monty Python & the Holy Grail 71