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=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:6794:: with SMTP id u142-v6mr662388itc.9.1539753377721; Tue, 16 Oct 2018 22:16:17 -0700 (PDT) X-Received: by 2002:aca:ab8b:: with SMTP id u133-v6mr434594oie.6.1539753377507; Tue, 16 Oct 2018 22:16:17 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feeder.erje.net!2.eu.feeder.erje.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!z5-v6no14026ite.0!news-out.google.com!n199-v6ni76itn.0!nntp.google.com!z5-v6no14025ite.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 16 Oct 2018 22:16:17 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=136.163.203.5; posting-account=g0yTkgoAAADdZGEYyZahxGlO3EkjH0Wv NNTP-Posting-Host: 136.163.203.5 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <63bee5dc-51c0-4092-8e46-69e0301f1427@googlegroups.com> Subject: Re: Least Dangerous Way to Do This ? From: Petter Fryklund Injection-Date: Wed, 17 Oct 2018 05:16:17 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:54611 Date: 2018-10-16T22:16:17-07:00 List-Id: > > Hi Everyone > > > > Okay, don't laugh(or laugh too hard) > > > > I need to interface with automatically generated C. function pointers a= re=20 > > represented as a pointer to a pointer to a char. This is weird but done= =20 > > for pointer arithmetic purposes. >=20 > It's not certain (in the real world, at least) if a function pointer and = an=20 > object pointer have the same representation. We treat them as completely= =20 > different things in our code generator, because some weird machines (in= =20 > particular the U2200) have very large representations for function pointe= rs=20 > (one version was 8 36-bit words!). Similarly, on the 16-bit 8086 compiler= s,=20 > function pointers carried a segment (thus a 32-bit address), and object= =20 > pointers usually didn't (thus a 16-bit address). >=20 > So if you want this code to work in different environments, I'd try to av= oid=20 > mixing the two (as Simon suggested). >=20 > Randy. I don't think the U2200 is weird, it is or was actually a very nice machine= . Unfortunately most of the Unisys Link=C3=B6ping people where kicked out b= efore we could try Ada, but we where very interested in it then. I for a wh= ile maintained the local releases of COBOL before going in to performance a= nalysis and cache-disk simulations. Is there any U2200 out there? comp.sys.unisys talks a lot about virtual one= s. Regards, Petter