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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,148ece082805bf8f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-12-13 12:46:11 PST Path: supernews.google.com!sn-xit-02!supernews.com!216.227.56.88.MISMATCH!telocity-west!TELOCITY!fr.clara.net!heighliner.fr.clara.net!newsfeed.germany.net!uni-erlangen.de!news-nue1.dfn.de!news-han1.dfn.de!news.fh-hannover.de!news.cid.net!news.enyo.de!news2.enyo.de!news1.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: GNAT bug with respect to an Implementation Advise Date: 13 Dec 2000 20:56:43 +0100 Organization: Enyo's not your organization Message-ID: <87aea0xfgk.fsf@deneb.enyo.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Xref: supernews.google.com comp.lang.ada:3092 Date: 2000-12-13T20:56:43+01:00 List-Id: "Jeff Creem" writes: > The LRM has an implementation advice that says: > > 13.13.2(17): Stream Oriented Attributes > > If a stream element is the same size as a storage element, then the normal > in-memory representation should be used by Read and Write for scalar > objects. Otherwise, Read and Write should use the smallest number of stream > elements needed to represent all values in the base range of the scalar ^^^^^^^^^^ > type. 'base range' is crucial here. > To which the GNAT RM says > > Followed. Correct. > type My_Uint is range 0 .. 65535; > for My_Uint'Size use 16; My_Uint'Base'First is -2**31, and My_Uint'Base'Last is 2**31-1, I think. > The 'write on my_uint writes 32 bits not 16 bits. I realize that the > 'write and 'size is an area where non-language lawyers get into > trouble all the time but it sure seems to me as if GNAT is not > following the IA. GNAT is following the IA, but the IA is surprising. There's also an AI on this issue, which involved a lot of discussion. (Some vendors do not follow the IA and want to change the standard to officially sanction the derivation, IMHO.