Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!ames!oliveb!sun!gorodish!guy From: guy@gorodish.UUCP Newsgroups: comp.lang.c Subject: Re: initializing null pointers Message-ID: <12980@sun.uucp> Date: Tue, 10-Feb-87 01:30:46 EST Article-I.D.: sun.12980 Posted: Tue Feb 10 01:30:46 1987 Date-Received: Wed, 11-Feb-87 07:16:37 EST References: <785@cullvax.UUCP> Sender: news@sun.uucp Reply-To: guy@sun.UUCP (Guy Harris) Organization: Sun Microsystems, Mountain View Lines: 14 >> 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!