comp.lang.ada
 help / color / mirror / Atom feed
From: dewarr@my-dejanews.com
Subject: Re: 83/95 issue, bad code or compiler bug
Date: 1998/11/23
Date: 1998-11-23T00:00:00+00:00	[thread overview]
Message-ID: <73cql5$g4i$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 36587057.292493@news.pacbell.net

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    




  reply	other threads:[~1998-11-23  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-19  0:00 83/95 issue, bad code or compiler bug Jeff Creem
1998-11-19  0:00 ` Tucker Taft
1998-11-19  0:00   ` Corey Ashford
1998-11-19  0:00     ` Corey Ashford
1998-11-19  0:00 ` Tom Moran
1998-11-20  0:00 ` Matthew Heaney
1998-11-20  0:00   ` Tom Moran
1998-11-20  0:00 ` Tom Moran
1998-11-21  0:00   ` dewarr
1998-11-22  0:00     ` Tom Moran
1998-11-23  0:00       ` dewarr [this message]
1998-11-24  0:00         ` Tom Moran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox