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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,fd173879a595bde X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!newsfeed.wirehub.nl!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Default rep specs for record types - documented?? Date: Mon, 14 Nov 2005 21:14:14 +0000 Organization: Pushface Message-ID: References: NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1132002859 20395 62.49.19.209 (14 Nov 2005 21:14:19 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Mon, 14 Nov 2005 21:14:19 +0000 (UTC) Cancel-Lock: sha1:BfsCYzWH16o+8QNeZy+YS/1boWQ= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news1.google.com comp.lang.ada:6386 Date: 2005-11-14T21:14:14+00:00 List-Id: Anonymous Coward writes: > As for records, I've imposed sizes on all my rep spec'd record > types. It would normally be needless, but to protect the maintainer > from accidentally defining a partial rep spec as the operational > spec grows, I've added a size spec so an error will be thrown at > compile time. Don't forget to consider alignment issues,especially as affected by processor type; for instance, a GNAT Ada.Calendar.Time is 8 bytes long, and has alignment of 4 bytes (the maximum) on x86 but alignment of 8 bytes on PowerPC. with Ada.Calendar; package Align is type R is record B : Boolean; T : Ada.Calendar.Time; end record; end Align; => Representation information for unit Align (spec) ------------------------------------------------ for R'Size use 128; for R'Alignment use 8; for R use record B at 0 range 0 .. 7; T at 8 range 0 .. 63; end record;