Walter Roberson wrote:
CBFalconer <cb********@mai neline.netwrote :
>Walter Roberson wrote:
>>Take an unsigned integral type. C promises no internal padding
and no trap representations . Initialize it. Take its address and
cast the address to unsigned char pointer. C defines this
transformatio n as being possible and that the resulting unsigned
chars will each have no internal non-value bits and no trap
representatio ns. ....
>Nonsense.
Hmm? Which part is nonsense? Is it the part of C89 3.3 Expressions
that says, "An object shall have its stored value accessed only
by an lvalue that has one of the following types:
[...] - a character type" ?
I think the following quote (from N869) is adequate:
6.2.6.2 Integer types
[#1] For unsigned integer types other than unsigned char,
the bits of the object representation shall be divided into
two groups: value bits and padding bits (there need not be
any of the latter). If there are N value bits, each bit
shall represent a different power of 2 between 1 and 2N-1,
so that objects of that type shall be capable of
representing values from 0 to 2N-1 using a pure binary
representation; this shall be known as the value
representation. The values of any padding bits are
unspecified.39)
--
<http://www.cs.auckland .ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfoc us.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
cbfalconer at maineline dot net
--
Posted via a free Usenet account from
http://www.teranews.com