comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not>
Subject: Re: Ada array contiguity.
Date: Sun, 19 Feb 2023 23:02:36 +0100	[thread overview]
Message-ID: <tsu69s$gfej$1@dont-email.me> (raw)
In-Reply-To: <tst8h6$de2q$1@dont-email.me>

On 2023-02-19 14:34, Rod Kay wrote:
> 
>     I've been told that Ada array elements are not guaranteed to be contiguous 
> unless the 'Convention C' aspect is applied.

The ARM says little about how the compiler represents objects in the absence of 
representation clauses. However, ARM 13.7(12) 
(http://www.ada-auth.org/standards/aarm12_w_tc1/html/AA-13-7-1.html#I5653) says, 
"Storage_Array represents a contiguous sequence of storage elements."

ARM 13.9(17/3) 
(http://www.ada-auth.org/standards/aarm12_w_tc1/html/AA-13-9.html#I5679) says 
that a compiler that supports Unchecked_Conversion should use a contiguous 
representation for certain constrained array subtypes.

Using convention Fortran should also ensure a contiguous representation, add can 
apply (unlike convention C) to multidimensional arrays.

-- 
Jeff Carter
"All citizens will be required to change their underwear
every half hour. Underwear will be worn on the outside,
so we can check."
Bananas
29

  parent reply	other threads:[~2023-02-19 22:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-19 13:34 Ada array contiguity Rod Kay
2023-02-19 14:28 ` J-P. Rosen
2023-02-19 14:59   ` Niklas Holsti
2023-02-19 15:08     ` Dmitry A. Kazakov
2023-02-19 17:10     ` J-P. Rosen
2023-02-19 17:54       ` Niklas Holsti
2023-02-19 19:05         ` Dmitry A. Kazakov
2023-02-20  7:12         ` J-P. Rosen
2023-02-19 22:02 ` Jeffrey R.Carter [this message]
2023-03-01 13:22 ` Rod Kay
replies disabled

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