|
|
Nicolas Alvarez wrote:
> http://www.parashift.com/c++-faq-lite/intrinsic-types.html#faq-26.6
"""
The C++ language guarantees there are no bits between two bytes. This means
every bit in memory is part of a byte. If you grind your way through memory
via a char*, you will be able to see every bit.
"""
I find it hard to believe you could even enforce that in a language. I'm
quite sure there are architectures where C can run that have memory
unaddressable by a char*. Certainly there are bits in floating point
registers (or even regular CPU registers) that many architectures don't give
you addresses for. Memory in memory-mapped panes (i.e., addressing more bits
than you have address space for) would also seem to be outlawed.
"""
The C++ language guarantees there are no bits that are part of two distinct
bytes. This means a change to one byte will never cause a change to a
different byte.
"""
I wish he'd actually cited the part of the standard that says things like
this. It would be interesting to know how it was actually worded.
--
Darren New, San Diego CA, USA (PST)
Insanity is a small city on the western
border of the State of Mind.
Post a reply to this message
|
|