Deutsch   English   Français   Italiano  
<vq18dq$nfjk$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Blady <p.p11@orange.fr>
Newsgroups: comp.lang.ada
Subject: Pack aspect with aliased component.
Date: Sun, 2 Mar 2025 10:29:28 +0100
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <vq18dq$nfjk$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 02 Mar 2025 10:29:30 +0100 (CET)
Injection-Info: dont-email.me; posting-host="347c4c1f46c7e86f8c420a5bb6f5bc6f";
	logging-data="769652"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18gE3Z+ofRNseYzYlVcOORh"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Lt9oW8UliOwSKpiZDc3lo/vNIaU=
Content-Language: fr, en-US
Bytes: 1971

Hello,

With the following AARM example:
14.e/3          {AI05-0229-1} procedure Q is
                    use P1, P2;
                    type Array1 is array(Integer range <>) of aliased S1
                       with Pack; -- warning: cannot pack aliased 
components (RM 13.2(7))

GNAT issues the warning in comment above.

Mentions of aliased in following AARM paragraphs are not so clear for me:
13.2 Packed Types

7.1/4   * {AI12-0001-1} Any component of a packed type that is of a
         by-reference type, that is specified as independently 
addressable, or
         that contains an aliased part, shall be aligned according to the
         alignment of its subtype.

9.c/3       {AI95-00291-02} {AI05-0229-1} Added clarification that the Pack
             aspect can ignore alignment requirements on types that 
don't have
             by-reference or aliased parts. This was always intended, 
but there
             was no wording to that effect.

What is correct ?
Why packed type couldn't have aliased components?

Thanks, Pascal.