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,438f2856ab36a026 X-Google-Attributes: gid103376,public From: dewarr@my-dejanews.com Subject: Re: 83/95 issue, bad code or compiler bug Date: 1998/11/23 Message-ID: <73cql5$g4i$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 414955862 References: <3654cef4.21572221@news.pacbell.net> <735903$qa2$1@nnrp1.dejanews.com> <36587057.292493@news.pacbell.net> X-Http-Proxy: 1.0 x3.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Mon Nov 23 23:21:25 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1998-11-23T00:00:00+00:00 List-Id: In article <36587057.292493@news.pacbell.net>, tmoran@bix.com (Tom Moran) wrote: > >I think you misunderstand this. The compiler is indeed f > >free to only access 8 bits in a case like this, and > >indeed this > >need not really be mentioned, it is obviously correct. > Do you mean that you understand > for X use at 0 range 0 .. 15; > to mean that the compiler may not use *more* than 16 bits > for X, but > is perfectly free to use *less*? I would find that > interpretation > bizarrely anti-useful and am certainly glad Gnat does not > seem to do > things that way. Yes, that interpretation *is* bizarrely anti-useful, and also has nothing to do with my statement. Reread the above quote more carefully. I said *access*! Of course the compiler must allocate the number of bits specified, but in the above case, since the number is known to be in the range 0..15, it is fine for the generated code to load only the low order byte. The only time this would make a difference is if the value was abnormal. Note that one exception is that a 'Valid test must load all 16-bits! Robert Dewar -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own