Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!gatech!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn) Newsgroups: net.lang.c Subject: Re: Global ptrs init to NULL or 0000? Message-ID: <3110@brl-tgr.ARPA> Date: Mon, 11-Nov-85 19:13:15 EST Article-I.D.: brl-tgr.3110 Posted: Mon Nov 11 19:13:15 1985 Date-Received: Tue, 12-Nov-85 06:24:03 EST References: <772@whuxl.UUCP> <139200016@uiucdcsb> Organization: Ballistic Research Lab Lines: 14 > OK, so what does > > static union { > int i; > char *p; > } foo; > > get initialized to on a machine with a non-0 NULL? The first member of the union is initialized with the appropriate form of 0, in this case (int)0. That is the main necessity for defining initializations of unions. The effect of trying to dereference the `p' member of this union is indeterminate.