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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b3edde39ad90f1b7 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Representation clauses and streams Date: 2000/01/03 Message-ID: <84qjto$e9l$1@nnrp1.deja.com>#1/1 X-Deja-AN: 567752306 References: <84du8g$c67$1@nnrp1.deja.com> <386F900C.235952C2@averstar.com> <84p1ot$c7n$1@nnrp1.deja.com> X-Http-Proxy: 1.0 x22.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Jan 03 16:49:02 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-01-03T00:00:00+00:00 List-Id: In article , Robert A Duff wrote: > Robert Dewar writes: > > > Apparently some other compilers failed to follow the RM advice > > in the first place, which is what is giving rise to the push > > to revise the language here. > > I don't think other compilers failed to follow the RM advice. I think > what happened is that different compilers chose different base ranges, > so even if all compilers follow the Advice, they don't all get the same > answer. Users griped about this, which caused the ARG to get involved. That's quite right, some compilers used different base ranges. Sorry for getting this confused in my previous post. I actually think that we are mostly OK here. I think that GNAT basically will do the right thing according to the modified IA with changes after all (I was confused on this point). Here is the specific case. If you say type x is range -128 .. +127; for x'size use 8; then (actually with or without the size clause), both the base type and the first subtype are 8 bits, so GNAT stream I/O uses 8 bits as expected. Some other compiler legitimately, but not very helpfully in this case, chose a base of 32 bits for type x above, and as a result used four bytes for the stream which was not what was wanted. So I think there is no problem with GNAT here after all, or more properly, the adjustment to GNAT to "agree" with the new IA will not have a major impact. Sent via Deja.com http://www.deja.com/ Before you buy.