|
|
On Thu, 30 Jul 2009 22:14:16 +0200, Darren New <dne### [at] sanrrcom> wrote:
> In other words, neither guarantees that the bit pattern in memory for
> NULL is actually all zeros, right?
Right.
> So using memset() to clear a structure to 0 that contains pointers isn't
> guaranteed to be portable to something like the AT&T 3B2, where NULL !=
> 0x0 in memory?
Assuming that you want the pointers to have null pointer values, it is
only portable to architectures that explicitly specify an all-zero bit
pattern for null pointers.
> I looked, but all I found were references to "null pointer value", and
> not any bit patterns.
The standard does not specify any particular bit pattern, so naturally
there is no mention of such things.
--
FE
Post a reply to this message
|
|