From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: GNAT "alignment value must be positive" Date: Thu, 9 Apr 2015 19:21:53 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1428625314 6333 24.196.82.226 (10 Apr 2015 00:21:54 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 10 Apr 2015 00:21:54 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:25504 Date: 2015-04-09T19:21:53-05:00 List-Id: wrote in message news:ac4c104c-ebcc-4132-9c53-783dfc083891@googlegroups.com... >On Wednesday, April 8, 2015 at 4:35:23 PM UTC-4, Randy Brukardt wrote: >> ... >> >> I should have added that the Recommended Level of Support does seem to >> require supporting that (probably should have read it before pushing >> "send"!), so in that sense, it's a GNAT bug to not allow it. But >> practically, 0 and 1 are the same for a specified alignment; nothing is >> going to be different about the default allocation, so it's doesn't >> really >> matter. >> >> Randy. > >Are you saying that it is not necessary to specify alignment zero for > records that end up specifying components of enclosing records whose > layout is being fully "rep-spec'd" (pragma Pack is not being used?). It never was. > Is it not (no longer?) necessary to ever indicate - as per Ada 95 RM 13.3 > [14] This paragraph is about "Address", not sure as to what you're referring. But the Ada 95 wording for Alignment contained a lot of nonsense. It was mostly rewritten for Ada 2005, as Binding Interpretation (meaning it applies to Ada 95 compilers as well), so reading the original wording does nothing but confuse yourself and everyone else. > - "zero means that the object is not necessarily aligned on a storage > element > boundary."? That's talking about the value of X'Alignment, when it is *read*, not so much when it is specified. (This is 13.3(23/2)). > Should "object" in the above really be "subtype" or object? Is it no > necessary > to indicate "not necessarily aligned on a storage element boundary" for > anything? No, the subtype wording is completely separate, because (as I noted), the old wording was nonsense. I'm not going to try to explain old nonsense. If we could have explained it, we wouldn't have rewritten it! > I know that those are a lot of questions but I am trying to understand > enough to > gain "full command" of this aspect of the language: I have always (at this > point > about 25 years!) been very interested in hardware and communication > interface > design in Ada. Then read the current RM, not older, buggier versions. The bleeding edge can be found at: http://www.ada-auth.org/standards/ada2x.html (this contains everything the ARG has approved to date). Ada 2012 can be found at: http://www.ada-auth.org/arm.html. People discover bugs in the RM all the time, and the ARG fixes them periodically. It's often impossible to explain the original wording, because it didn't make sense for one reason or another. There's a reason that newer standard replace the older ones (even if that doesn't always happen practically). Randy.