From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a05:6214:2464:: with SMTP id im4mr5991989qvb.61.1614891646713; Thu, 04 Mar 2021 13:00:46 -0800 (PST) X-Received: by 2002:a25:d843:: with SMTP id p64mr8552268ybg.339.1614891646535; Thu, 04 Mar 2021 13:00:46 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!news.uzoreto.com!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 4 Mar 2021 13:00:46 -0800 (PST) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=146.5.2.231; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 146.5.2.231 References: <02709d96-50fe-4e87-bdb5-4f430fa2717an@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <29d7b43c-12d1-4104-9f3e-53b0429e6b0an@googlegroups.com> Subject: Re: converting pointer to value From: Shark8 Injection-Date: Thu, 04 Mar 2021 21:00:46 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:61470 List-Id: On Thursday, March 4, 2021 at 1:09:24 PM UTC-7, Simon Wright wrote: > Shark8 writes: > > > if they did not have the same representation you would > > have to use UNCHECKED_CONVERSION > and you'd be in a world of pain Not necessarily, as the registers of x86 show with AX overlaid upon AH+AL, absolutely not the same representation, unchecked_conversion (or address-overlay) would be a perfectly fine way to model the situation. But the given situation: a 16-bit integer and an address-type? / That's just asking for pain.