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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.52.22.3 with SMTP id z3mr10296287vde.0.1428353298152; Mon, 06 Apr 2015 13:48:18 -0700 (PDT) X-Received: by 10.182.16.163 with SMTP id h3mr110524obd.26.1428353298090; Mon, 06 Apr 2015 13:48:18 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!z60no22616qgd.0!news-out.google.com!n7ni543igk.0!nntp.google.com!l13no1735222iga.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 6 Apr 2015 13:48:17 -0700 (PDT) In-Reply-To: <0817bf94-0550-40c4-ba5f-f2ecd6383dbb@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=75.161.76.169; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 75.161.76.169 References: <0817bf94-0550-40c4-ba5f-f2ecd6383dbb@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: GNAT "alignment value must be positive" From: Shark8 Injection-Date: Mon, 06 Apr 2015 20:48:18 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:25442 Date: 2015-04-06T13:48:17-07:00 List-Id: It's because "alignment 0" corresponds to an internal divide-by-zero error. The LRM (13.4) gives the definition of the alignment portion of record-spec= ification as: alignment_clause ::=3D at mod static_simple_expression; So, "mod 0" is obviously erroneous in that case... however, that is the spe= cial case of records; in-general what we want is found in 13.3 which says, = in part: 22/2 For a prefix X that denotes an object:=20 23/2 X'Alignment The value of this attribute is of type universal_integer, and nonnega= tive; zero means that the object is not necessarily aligned on a storage el= ement boundary. If X'Alignment is not zero, then X is aligned on a storage = unit boundary and X'Address is an integral multiple of X'Alignment (that is= , the Address modulo the Alignment is zero). So, here the 0-alignment means that there is no imposed alignment WRT stora= ge-element boundaries. ----------- All that said, it could be a bug where GNAT treats an aspect differently th= an the corresponding representation-clause/pragma.