Thomas Dickey <[EMAIL PROTECTED]> writes:

> I'm told that AIX's compiler does not necessarily do this for uninitialized
> values (and have received a number of patches to make things initialized on
> that platform).

THis would be the OS which is responsible, not the compiler.  In any
case, I cannot believe this.  All kinds of code depends on this.

> -- have also been told that pointers are not guaranteed by the standard to
>    be initialized to 0's.

A bit different: the standard does not demand that the NULL macro
actually expands to the value zero.  The only machine with flat
address space (and this is what your code assumes) which used this
loophole were the Transputer.  Their address space ranged from
-0x80000000 to 0x7fffffff and 0 was a valid address in the middle.  I
don't think you should care about this and continue to rely on
pointers being initialized to NULL by default.  No CPU/OS vendor
nowadays can risk diverging from this rule if they ever want to see
applications running on their systems.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------
-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/lists/

Reply via email to