Pack aspect with aliased component.

Liste des GroupesRevenir à cl ada 
Sujet : Pack aspect with aliased component.
De : p.p11 (at) *nospam* orange.fr (Blady)
Groupes : comp.lang.ada
Date : 02. Mar 2025, 10:29:28
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vq18dq$nfjk$1@dont-email.me>
User-Agent : Mozilla Thunderbird
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.

Date Sujet#  Auteur
2 Mar 25 * Pack aspect with aliased component.3Blady
2 Mar 25 `* Re: Pack aspect with aliased component.2Jeffrey R.Carter
6 Mar 25  `- Re: Pack aspect with aliased component.1Blady

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal