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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1054df2e2c490eda X-Google-Attributes: gid103376,public From: stt@henning.camb.inmet.com (Tucker Taft) Subject: Re: Q: Memory management Date: 1996/06/25 Message-ID: #1/1 X-Deja-AN: 162150280 sender: news@inmet.camb.inmet.com (USENET news) x-nntp-posting-host: henning.camb.inmet.com references: organization: Intermetrics, Inc. newsgroups: comp.lang.ada Date: 1996-06-25T00:00:00+00:00 List-Id: Hannes Haug (Hannes.Haug@Student.Uni-Tuebingen.de) wrote: : >>>>> "Wes" == "W Wesley Groleau (Wes)" writes: : Wes> Hannes suggests : >> Pass_To_Assembler ( X ( X.all'First )'Address ); : Wes> X.all'First and X'First should be identical. : Wes> X'Address and X(X'First)'Address should be identical, too, : Wes> unless ... : Is this true if you deal with unconstrained arrays ? The bounds have : to be stored at the beginning of the array. I think that X'Address : would give you the address of the location where the bounds are stored. In Ada 95, the 'Address of an array is supposed to point at the first component, independent of where the bounds are stored. See RM95-13.3(14). In Ada 83, it was not specified, and compilers differed in their interpretation of 'Address on an array. You are certainly safe using X(X'First)'Address. On the other hand, if X is a pointer, X'Address and X.all'Address are definitely *not* the same thing. X'Address is the address of the pointer, X.all'Address is the address of (the first component of) the pointed-to object. : -hannes -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Cambridge, MA USA