comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: Legit Warnings or not
Date: Fri, 22 Jul 2011 07:54:54 -0700 (PDT)
Date: 2011-07-22T07:54:54-07:00	[thread overview]
Message-ID: <0bbabc10-c546-4ece-a3a1-deb9ec94f9fc@r28g2000prb.googlegroups.com> (raw)
In-Reply-To: j0bilg$mr4$2@dont-email.me

On Jul 22, 3:16 am, Brian Drummond <br...@shapes.demon.co.uk> wrote:
> On Thu, 21 Jul 2011 14:54:35 -0700, Adam Beneschan wrote:
> > On Jul 21, 2:30 pm, Brian Drummond <br...@shapes.demon.co.uk> wrote:
>
> >> Seems that this implies that either (a: unlikely) the variable-sized
> >> component MUST remain in place in the record (which makes resizing it
> >> all but impossible) or (b: would work) the record must contain an
> >> ACCESS to it (in which case the implementation silently does something
> >> other than the declaration says).
>
> > (b) is pretty much how this would be implemented.  With regard to your
> > comment "the implementation silently does something other than the
> > declaration says":  the implication, [...] isn't warranted.  If there  
> > are no representation items, then a declaration says *nothing* about
> > how a type is represented.
>
> Thank you for the correction.
> ... the implementation silently does something other than I wrongly
> inferred from the declaration.
> I can live with that!
>
> I considered adding a comment that this would make representation clauses
> difficult, as you suggest.
>
> On the one hand, I would find it difficult to think of a practical use
> for a representation clause for this object ... on the other, unless
> aliasing this monster is specifically prohibited, there appears to be
> room for nasty corner cases. Is there such a rule?

Bob and I discussed this a little, above.  There's no rule against
aliasing the whole record, but that shouldn't pose a problem.  As for
aliasing just the dynamic array component, you can declare it
"aliased", but you can't do anything that would actually result in
aliasing (like use X.Name'Access) unless it is known that Name's size
can't change (which means that the compiler has to make sure the
pointer doesn't change either).  So I think the rules are sufficient
to avoid problems.

                                   -- Adam




  reply	other threads:[~2011-07-22 14:54 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-20 22:30 Legit Warnings or not Anh Vo
2011-07-20 23:16 ` Robert A Duff
2011-07-21 18:43   ` Anh Vo
2011-07-23  0:26   ` Randy Brukardt
2011-07-23 14:26     ` Robert A Duff
2011-07-21  2:37 ` Jeffrey Carter
2011-07-21  9:50   ` Brian Drummond
2011-07-21 14:39     ` Dmitry A. Kazakov
2011-07-23  0:36       ` Randy Brukardt
2011-07-23  9:03         ` Dmitry A. Kazakov
2011-07-23 11:07           ` Simon Wright
2011-07-23 11:21             ` Dmitry A. Kazakov
2011-07-26 21:25           ` Randy Brukardt
2011-07-27  7:45             ` Dmitry A. Kazakov
2011-07-28  0:37               ` Randy Brukardt
2011-07-28  9:22                 ` Dmitry A. Kazakov
2011-07-28 14:22                   ` Robert A Duff
2011-07-28 14:41                     ` Dmitry A. Kazakov
2011-07-28 15:10                       ` Robert A Duff
2011-07-28 17:05                         ` Dmitry A. Kazakov
2011-07-28 23:32                           ` Randy Brukardt
2011-07-28 23:48                   ` Randy Brukardt
2011-07-29  6:57                     ` Simon Wright
2011-07-29 18:56                       ` Jeffrey Carter
2011-07-30  0:13                       ` Randy Brukardt
2011-07-29  7:41                     ` Dmitry A. Kazakov
2011-07-30  0:17                       ` Randy Brukardt
2011-07-30  8:27                         ` Dmitry A. Kazakov
2011-08-01 22:12                           ` Randy Brukardt
2011-08-02 10:01                             ` Dmitry A. Kazakov
2011-08-02 21:30                               ` Randy Brukardt
2011-08-03  9:01                                 ` Dmitry A. Kazakov
2011-08-03 20:35                                   ` Randy Brukardt
2011-08-04  8:11                                     ` Dmitry A. Kazakov
2011-08-05 23:57                                       ` Randy Brukardt
2011-08-06  8:23                                         ` Dmitry A. Kazakov
2011-08-08 21:30                                           ` Randy Brukardt
2011-07-23 14:32         ` Robert A Duff
2011-07-26 21:32           ` Randy Brukardt
2011-07-21 15:28     ` Adam Beneschan
2011-07-21 15:41       ` Robert A Duff
2011-07-21 20:12         ` Adam Beneschan
2011-07-23  0:31           ` Randy Brukardt
2011-07-21 17:40     ` Jeffrey Carter
2011-07-21 21:30       ` Brian Drummond
2011-07-21 21:54         ` Adam Beneschan
2011-07-22 10:16           ` Brian Drummond
2011-07-22 14:54             ` Adam Beneschan [this message]
2011-07-23  0:46             ` Randy Brukardt
2011-07-23  0:42         ` Randy Brukardt
2011-07-23  9:20           ` Niklas Holsti
2011-08-04  5:56             ` David Thompson
2011-07-23  9:24           ` Dmitry A. Kazakov
2011-07-23 12:36           ` Brian Drummond
2011-07-21 15:13   ` Robert A Duff
2011-07-23  0:52     ` Randy Brukardt
2011-07-23 14:48       ` Robert A Duff
2011-07-21 14:17 ` anon
replies disabled

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