Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!genrad!mit-eddie!godot!ima!ISM780B!jim From: jim@ISM780B.UUCP Newsgroups: net.lang.c Subject: Re: Must a NULL pointer be a 0 bit patte Message-ID: <102@ISM780B.UUCP> Date: Sat, 3-Nov-84 12:28:29 EST Article-I.D.: ISM780B.102 Posted: Sat Nov 3 12:28:29 1984 Date-Received: Sun, 4-Nov-84 04:43:11 EST Lines: 24 Nf-ID: #R:wjh12:-52900:ISM780B:25500050:000:1114 Nf-From: ISM780B!jim Oct 24 15:00:00 1984 >/* Written 12:37 pm Oct 22, 1984 by ron@brl-tgr in ISM780B:net.lang.c */ >> It seems to me that K&R guarantees that globals are initialized to zero, >> not to a nil pointer. A lot of code will bite the dust given a machine >> with a non-zero nil pointer. >> >> -- Jim Balter, INTERACTIVE Systems (ima!jim) > >BUT that still doesn't make it legal to 0-> something. > >-Ron I just love those non-sequiturs. In case you hadn't noticed, *this* discussion is about whether NULL can be non-zero. Aside from the case of BSS initialization, which one could argue is equivalent to an assignment so the compiler can handle pointers by initializing them (good luck to people who depend on these variables really going into .bss), there is calloc and memset(&structure, '\0', sizeof structure); these would have to be changed to explicit member-by-member assignment, or assignment from a dummy previously initialized structure. Of course, the standards committee could always get carried away and add initializers as valid structure constants, like many *modern* languages. -- Jim Balter, INTERACTIVE Systems (ima!jim)