Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!henry
From: henry@utzoo.UUCP (Henry Spencer)
Newsgroups: net.lang.c
Subject: Re: Must a NULL pointer be a 0 bit pattern?
Message-ID: <4493@utzoo.UUCP>
Date: Thu, 18-Oct-84 12:21:14 EDT
Article-I.D.: utzoo.4493
Posted: Thu Oct 18 12:21:14 1984
Date-Received: Thu, 18-Oct-84 12:21:14 EDT
References: <6542@mordor.UUCP> <529@wjh12.UUCP>, <4483@utzoo.UUCP>
Organization: U of Toronto Zoology
Lines: 13

The ANSI C committee apparently has talked about the problem of the semantics
of default initialization to "zero".  I am told that the latest draft, about
to be released, says that the default initialization of static data acts as
if everything had been assigned the integer constant 0.  So pointers really
do get initialized to NULL and floating-point numbers to 0.0, regardless of
the actual bit-level representations.  And the rule for initialization of
unions resolves the original example that started this discussion.

It is agreed that the semantics of calloc() would be tricky on a machine
with non-000 representations of 0.0 or NULL, but there's no simple fix.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry