Uninitialized global data (was Re: Global variables)
Doug Gwyn
gwyn at brl-smoke.ARPA
Thu Mar 24 07:02:35 AEST 1988
In article <978 at mcgill-vision.UUCP> mouse at mcgill-vision.UUCP (der Mouse) writes:
>Could someone with access to the draft clear this up?
Without even looking it up, I can tell you that the default initial
values are required to be zeros of the right type. Pointers would
have null pointer values, integer types all 0 bits (in effect), and
floating point data would have 0.0 even if the bit pattern required
for this is not all 0 bits. On many implementations, filling BSS
with all-0 bytes will do the trick, but there are those that require
more elaborate initialization.
More information about the Comp.lang.c
mailing list