comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Null Range in Unconstrasined Array
Date: Mon, 31 Aug 2009 22:11:23 -0500
Date: 2009-08-31T22:11:23-05:00	[thread overview]
Message-ID: <h7i3f9$qo2$1@munin.nbi.dk> (raw)
In-Reply-To: f237670b-ade0-461f-9d02-5eff803e91bc@p10g2000prm.googlegroups.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1129 bytes --]

"Rick" <rickduley@gmail.com> wrote in message 
news:f237670b-ade0-461f-9d02-5eff803e91bc@p10g2000prm.googlegroups.com...
>If I have an unconstrained array type 'My_Array_Type' and declare an
>instance of it as:
>
>My_Array : My_Array_Type (1 .. 0);
>
>then the LRM tells me it is a null range:
>
>3.5 (4): A range with lower bound L and upper bound R is described by
>�L .. R�. If R is less than L, then the range is a null range, and
>specifies an empty set of values.
>
>What, exactly, is My_Array (forgive the language) pointing to?
>Is any memory allocated to My_Array?

That's a question that the ARG decided not to answer in general. (It matters 
for aliased objects and "=" of accesses to such objects). We agreed to not 
decide (see AI95-00350-1, voted No Action). It seems silly to require 
allocating memory for objects with no components, but some people think that 
it is important that access type compare unequal. Thus there was no 
agreement on clarifying the wording.

So you'll have to look to see what your particular compiler does.

                                                              Randy.





  reply	other threads:[~2009-09-01  3:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-01  1:28 Null Range in Unconstrasined Array Rick
2009-09-01  3:11 ` Randy Brukardt [this message]
2009-09-01 14:50 ` Adam Beneschan
2009-09-01 15:34   ` Robert A Duff
2009-09-06 12:11     ` Peter C. Chapin
2009-09-06 12:41       ` Robert A Duff
2009-09-08 17:54         ` Adam Beneschan
2009-09-09  8:35           ` Stephen Leake
2009-09-09 13:00             ` Robert A Duff
2009-09-09 19:22             ` sjw
2009-09-10 23:24               ` Stephen Leake
replies disabled

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