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!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: X'Alignment and System.Address without a "mod" operator? Date: Mon, 05 Jan 2015 15:49:16 +0100 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: <87k311l1ub.fsf@adaheads.sparre-andersen.dk> NNTP-Posting-Host: 195.249.206.131 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: loke.gir.dk 1420469356 956 195.249.206.131 (5 Jan 2015 14:49:16 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 5 Jan 2015 14:49:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:9DJHOQHSOzhofQtOa92gy+VE6zo= Xref: news.eternal-september.org comp.lang.ada:24366 Date: 2015-01-05T15:49:16+01:00 List-Id: RM 13.3(23/2) says: The value of this attribute is of type universal_integer, and nonnegative; zero means that the object is not necessarily aligned on a storage element 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). But when I look for a suitable function to check the requirement in the final parenthesis in package System (RM 13.7) - something like: function "mod" (Left : Address; Right : some_integer_type) return some_integer_type; it isn't there. That makes it kind of hard to implement storage pools for types with alignment requirements. I suppose I should report the problem to Ada-Comment, but I would prefer that somebody could tell me that I have overlooked something. Greetings, Jacob -- "If I have to choose between two evils, I choose the one I haven't tried before."