comp.lang.ada
 help / color / mirror / Atom feed
From: Eryndlia Mavourneen <eryndlia@gmail.com>
Subject: Re: Gnat's Handling of Record with Address Clause
Date: Thu, 26 Sep 2013 08:05:17 -0700 (PDT)
Date: 2013-09-26T08:05:17-07:00	[thread overview]
Message-ID: <ebe1ec4d-5cf2-49ac-84fe-9fea4da744ee@googlegroups.com> (raw)
In-Reply-To: <8b2c53f7-9018-4817-82a7-c93835c3866c@googlegroups.com>

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 wrote:
> 
> I haven't looked over the whole post yet, but just looking at this part:
> 
> > RM 13.1(22) says: "An implementation need not support the specification for a representation aspect that contains nonstatic expressions, unless each nonstatic expression is a name that statically denotes a constant declared before the entity."
> 
> > The overall effect of all this appears to be that Gnat is allowed to disallow 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 possible.
> 
> it seems that you could still use System.Address_To_Access_Conversions to achieve what you need.  (RM 13.7.2)
> 
>                               -- 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 declaring an access type for My_Buffer_T, then doing the address -> access conversion for an access variable on that type.  

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 clause should be enough of a flag of a potential problem.  -or-  Is this handling of a dynamic address really that difficult to implement?

-- Eryndlia (KK1T)


  reply	other threads:[~2013-09-26 15:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-26 14:23 Gnat's Handling of Record with Address Clause Eryndlia Mavourneen
2013-09-26 14:48 ` Adam Beneschan
2013-09-26 15:05   ` Eryndlia Mavourneen [this message]
2013-09-26 15:21     ` Adam Beneschan
2013-09-26 15:09 ` Adam Beneschan
2013-09-26 15:46   ` Eryndlia Mavourneen
2013-09-26 20:00 ` Shark8
2013-09-27 12:55   ` Eryndlia Mavourneen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox