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,2203a21a136b39cc X-Google-Attributes: gid103376,public From: kst@sd.aonix.com (Keith Thompson) Subject: Re: Fortran's Equivalence Date: 1997/04/07 Message-ID: #1/1 X-Deja-AN: 232165123 Sender: news@thomsoft.com (USENET News Admin @flash) X-Nntp-Posting-Host: pulsar References: <333840D1.7B12@cae.ca> <5hbcdn$i1h@top.mitre.org> Organization: Aonix, San Diego, CA, USA Newsgroups: comp.lang.ada Originator: kst@pulsar Date: 1997-04-07T00:00:00+00:00 List-Id: In dewar@merv.cs.nyu.edu (Robert Dewar) writes: > Keith said > > <<1. If you're going to implement overlays using address clauses, it's safer > (and can't do any harm) to declare all the overlaid objects as aliased. > Pragma Volatile might be even better. Perhaps someone more familiar > with this than I am can elaborate (or execute, or evaluate 8-)}).>> > > There is no particular point in declaring these objects aliased, unless you > intend to take their address or take a pointer to them. [...] To get the overlay in the first place, you have to take the address of at least one of the objects (unless you use some other ugly trick): Obj1 : Some_Type; ... Obj2 : Some_Other_Type_With_Compatible_Size_And_Alignment; for Obj2'Address use Obj1'Address; So at least Obj1 should be declared aliased, right? -- Keith Thompson (The_Other_Keith) kst@sd.aonix.com <*> TeleSo^H^H^H^H^H^H Alsy^H^H^H^H Thomson Softw^H^H^H^H^H^H^H^H^H^H^H^H^H Aonix 5040 Shoreham Place, San Diego, CA, USA, 92122-5989 "Humor is such a subjective thing." -- Cartagia