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 10.224.5.5 with SMTP id 5mr4302427qat.4.1380207917744; Thu, 26 Sep 2013 08:05:17 -0700 (PDT) X-Received: by 10.182.66.130 with SMTP id f2mr31487obt.29.1380207917707; Thu, 26 Sep 2013 08:05:17 -0700 (PDT) Path: border1.nntp.ams3.giganews.com!border2.nntp.ams3.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!209.85.216.88.MISMATCH!d5no2030808qap.0!news-out.google.com!9ni338qaf.0!nntp.google.com!d5no2030806qap.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 26 Sep 2013 08:05:17 -0700 (PDT) In-Reply-To: <8b2c53f7-9018-4817-82a7-c93835c3866c@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=129.59.203.113; posting-account=7Oy7OQoAAABhVYFOo553Cn1-AaU-bSfl NNTP-Posting-Host: 129.59.203.113 References: <62fd156b-0be2-4465-aeba-287ec9ce22e0@googlegroups.com> <8b2c53f7-9018-4817-82a7-c93835c3866c@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Gnat's Handling of Record with Address Clause From: Eryndlia Mavourneen Injection-Date: Thu, 26 Sep 2013 15:05:17 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Original-Bytes: 3048 Xref: number.nntp.dca.giganews.com comp.lang.ada:183477 Date: 2013-09-26T08:05:17-07:00 List-Id: On Thursday, September 26, 2013 9:48:23 AM UTC-5, Adam Beneschan wrote: > On Thursday, September 26, 2013 7:23:36 AM UTC-7, Eryndlia Mavourneen wro= te: >=20 > I haven't looked over the whole post yet, but just looking at this part: >=20 > > RM 13.1(22) says: "An implementation need not support the specification= for a representation aspect that contains nonstatic expressions, unless ea= ch nonstatic expression is a name that statically denotes a constant declar= ed before the entity." >=20 > > The overall effect of all this appears to be that Gnat is allowed to di= sallow a dynamically-determined address for an object. If this is what is = happening here (not a bug in Gnat), then it would seem that any kind of OS = work, looping through a kernel linked list, for instance, would not be poss= ible. >=20 > it seems that you could still use System.Address_To_Access_Conversions to= achieve what you need. (RM 13.7.2) >=20 > -- Adam Thank you for the idea, Adam. This sounds like an approach; I will try it. Since the "Message" parameter is an address, I assume that you mean declari= ng an access type for My_Buffer_T, then doing the address -> access convers= ion for an access variable on that type. =20 A lot of work to get around this Gnat issue. I wonder why Adacore doesn't = just allow you to do this in the first place. The use of the Address claus= e should be enough of a flag of a potential problem. -or- Is this handlin= g of a dynamic address really that difficult to implement? -- Eryndlia (KK1T)