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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:ae9:e907:: with SMTP id x7mr4195832qkf.298.1576086864864; Wed, 11 Dec 2019 09:54:24 -0800 (PST) X-Received: by 2002:a54:4482:: with SMTP id v2mr3579994oiv.0.1576086864522; Wed, 11 Dec 2019 09:54:24 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.swapon.de!aioe.org!peer02.am4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!g89no4617261qtd.0!news-out.google.com!w29ni1017qtc.0!nntp.google.com!g89no4617241qtd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 11 Dec 2019 09:54:24 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:c7d:3c35:b000:325a:3aff:fe0f:37a5; posting-account=L2-UcQkAAAAfd_BqbeNHs3XeM0jTXloS NNTP-Posting-Host: 2a02:c7d:3c35:b000:325a:3aff:fe0f:37a5 References: <36d45c82-2a6b-4c60-baeb-1a4aef5189c7@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <69c7677b-4aec-4db2-b240-de6b69f762b9@googlegroups.com> Subject: Re: Is this actually possible? From: Lucretia Injection-Date: Wed, 11 Dec 2019 17:54:24 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 2134 X-Received-Body-CRC: 1750099559 Xref: reader01.eternal-september.org comp.lang.ada:57707 Date: 2019-12-11T09:54:24-08:00 List-Id: On Wednesday, 11 December 2019 17:38:40 UTC, Dmitry A. Kazakov wrote: > On 2019-12-11 17:43, Lucretia wrote: > > > I was thinking about extensible records recently (not tagged types), and thought to try to export a tagged type to C, not C++. It compiles, but the results aren't quite right, so wondering if it's possible or not. > > > > The idea is to export an array of tagged types as a C array to either a function or a variable / struct element. i.e. > > Ada objects of tagged types have varying size and keep tag inside. Both > make them utterly incompatible with C. I know this, but as the compiler let it go through, I wondered if the tag would be stored elsewhere and not with the tagged type. Otherwise, shouldn't the compiler complain? Luke.