[comp.lang.c] initializing auto vars

ballou@brahms.Berkeley.EDU.UUCP (02/08/87)

In article <8134@tekecs.TEK.COM> jans@stalker.UUCP (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!

	Do you mean that they do not initialize auto variables for which you
have explicitly supplied initializations?  If so, that is a bug.  If not, why
should the compiler initialize them?  There is no guarantee that they will
be initialized, and it does cost something (in both time and code size) to
do the initialization.  Specifically, if I have a recursive function which
is called fairly often, I certainly don't want to pay the overhead of useless
initialization.
--------
Kenneth R. Ballou			ARPA:  ballou@brahms.berkeley.edu
Department of Mathematics		UUCP:  ...!ucbvax!brahms!ballou
University of California
Berkeley, California  94720