Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!mit-eddie!genrad!decvax!tektronix!orca!tekecs!stalker!jans From: jans@stalker.UUCP Newsgroups: comp.lang.c Subject: Re: initializing null pointers Message-ID: <8145@tekecs.TEK.COM> Date: Tue, 10-Feb-87 11:32:51 EST Article-I.D.: tekecs.8145 Posted: Tue Feb 10 11:32:51 1987 Date-Received: Fri, 13-Feb-87 06:26:44 EST References: <785@cullvax.UUCP> Sender: nobody@tekecs.TEK.COM Reply-To: jans@stalker.UUCP (Jan Steinman) Organization: Tektronix, Inc., Wilsonville, OR Lines: 17 In article <785@cullvax.UUCP> drw@cullvax.UUCP (Dale Worley) writes: >jans@stalker.gwd.tek.com (Jan Steinman) writes: >> 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! ^^^^^^^^^^ <--- should have been globals > >I would suspect that any optiomizing compiler would try to avoid >initializing automatics--they're not required to, and it takes time. Yes, several of you have reminded me of my mistake. The BDS compiler I used under CP/M didn't even initialize globals, and at least one or two others I've used didn't initialize statics -- clearly violating K&R p 198. :::::: Artificial Intelligence Machines --- Smalltalk Project :::::: :::::: Jan Steinman Box 1000, MS 60-405 (w)503/685-2956 :::::: :::::: tektronix!tekecs!jans Wilsonville, OR 97070 (h)503/657-7703 ::::::