static versus auto initialization

dmr at alice.UUCP dmr at alice.UUCP
Tue Jan 24 14:35:25 AEST 1989


Bob Devine (in decwrl.8901231945.AA05683) points out that K&R 2ed
claims (p. 86) that partially initialized automatic aggregates
leave the part not explicitly initialized as garbage.

This claim is in error; as several people have pointed out, the pANS
guarantees that if an automatic is initialized at all, it is
initialized the same way as a static, with assignment of 0 to
the missing members.

			Apologies,
			Dennis Ritchie



More information about the Comp.lang.c mailing list