initializing null pointers
guy at gorodish.UUCP
guy at gorodish.UUCP
Tue Feb 10 16:30:46 AEST 1987
>> The most portable thing to do is NEVER dereference a pointer that has not
>> been initialized. Some micro compilers I've used don't even initialize
>> automatics!
>
>I would suspect that any optiomizing compiler would try to avoid
>initializing automatics--they're not required to, and it takes time.
I have yet to see a C compiler that initializes *any* automatics
except those it was told to. (If it doesn't initialize them, well,
all together now, "It's not a C compiler.") You *may* get automatics
initialized to a bit pattern of all zeroes (not necessarily to 0,
please note) in a UNIX implementation if the area being used for the
activation record has never been used before; however, this is NOT
behavior to be relied on!
More information about the Comp.lang.c
mailing list