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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b14cbbd362590ac9 X-Google-Attributes: gid103376,public From: Keith Thompson Subject: Re: Rep-spec question Date: 1999/11/11 Message-ID: #1/1 X-Deja-AN: 547560776 Sender: kst@king.cts.com References: <80ck3b$deu$1@nnrp1.deja.com> <80clia$ein$1@nnrp1.deja.com> <80clr0$etf$1@nnrp1.deja.com> <80cqb7$if9$1@nnrp1.deja.com> X-Trace: thoth.cts.com 942367661 97486 198.68.168.21 (12 Nov 1999 00:47:41 GMT) Organization: CTS Network Services Newsgroups: comp.lang.ada X-Complaints-To: newsmaster@cts.com Date: 1999-11-11T00:00:00+00:00 List-Id: Ted Dennison writes: > In article <80clr0$etf$1@nnrp1.deja.com>, [...] > The implementation advice in question (from 13.3) is: > > --- > The recommended level of support for the Size attribute of objects is: > > A Size clause should be supported for an object if the specified Size is > at least as large as its subtype's Size, and corresponds to a size in > storage elements that is a multiple of the object's Alignment (if the > Alignment is nonzero). > --- Which raises some interesting questions. This implies that an implementation that follows the advice must accept the following: N : Integer; for N'Size use 1_000_000 * Integer'Size; (assuming sufficient memory). Where do the significant bits go? What if N is aliased, and you create a pointer to it (think about endianness)? If you pass N as a parameter, how many bits are actually passed? I think there's an AI that modifies the above advice. As I recall, it says that an implementation needn't accept a size clause for an integer object if the specified size is bigger than the size of the largest supported integer type. (This could still make things interesting if, for example, Short_Integer is 16 bits, and you declare a Short_Integer object specified to be 32 or 64 bits, especially on a big-endian machine.) I'm too lazy to look up the AI; perhaps someone else can do so. -- Keith Thompson (The_Other_Keith) kst@cts.com San Diego Supercomputer Center <*> "Oh my gosh! You are SO ahead of your time!" -- anon.