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 16:48:18 PST Path: supernews.google.com!sn-xit-02!supernews.com!isdnet!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!newspump.sol.net!news.execpc.com!newspeer.sol.net!homer.alpha.net!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <87aea0xfgk.fsf@deneb.enyo.de> Subject: Re: GNAT bug with respect to an Implementation Advise X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 Message-ID: Date: Wed, 13 Dec 2000 18:49:09 -0600 NNTP-Posting-Host: 156.46.62.124 X-Complaints-To: abuse@alpha.net X-Trace: homer.alpha.net 976754895 156.46.62.124 (Wed, 13 Dec 2000 18:48:15 CST) NNTP-Posting-Date: Wed, 13 Dec 2000 18:48:15 CST Xref: supernews.google.com comp.lang.ada:3107 Date: 2000-12-13T18:49:09-06:00 List-Id: Florian Weimer wrote in message <87aea0xfgk.fsf@deneb.enyo.de>... >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. No, that's an oversimplification. The problem is that the Ada 95 standard never specifies what the base range is. That is left up to compilers. Thus, there is no way to tell how many bytes are written out by a particular type. (There is also the issue that you can't read hetrogenus data structures defined outside of Ada at all without some control over this.) For instance, if you have the type: type Byte is range 0 .. 255; for Byte'Size is 8; the base range might be: Byte'Base'First = -32768, Byte'Base'Last = 32767 (i.e. 16 bits read/written by streams) or it might be Byte'Base'First = -2**31, Byte'Base'Last = 2**31-1 (i.e. 32 bits read/written by streams) or something else again (say on a 24-bit machine). These are all legal, correct implementations of Ada, and even if all of the implementations follow the IA, they won't be compatible. Randy.