Public Comment Number PC-UK0125 ISO/IEC CD 9899 (SC22N2620) Public Comment =========================================== Date: 1998-02-25 Author: N.M Maclaren Author Affiliation: Self Postal Address: University of Cambridge, Computer Laboratory, New Museums Site, Pembroke Street, Cambridge CB3 3QG, United Kingdom E-mail Address: Telephone Number: +44 1223 334761 Fax Number: +44 1223 334679 Number of individual comments: 1 Comment 1. Category: Normative change to existing feature retaining the original intent Committee Draft subsection: 6.5.8, F.7.5 Title: Initialisation to zero Detailed description: Section 6.5.8 paragraph 10 requires initialization to zero for arithmetic types, but IEEE 754 has more than one zero, and there is the problem mentioned under 6.1.2.8.2 Integer types. This is a consequence of the ambiguity in C89 over whether arithmetic objects were initialised to a value of zero or all bits zero. I don't THINK that there is any way to distinguish two null pointers in a conforming program, unless conversions of a null pointer to an integer give more than one representation of zero. I can see nothing that requires all initialisations to use the same value, though this is implied by C89 and assumed by a great many existing programs. It would be a major quiet change to allow initialisations to different, distinguishable values of zero or null pointers. I suggest adding the following to 6.5.8: If there is more than one possible representation of a null pointer or a zero for a particular type and the representations can be distinguished by a conforming program, the implementation shall use one value for all implicit initialisations of objects of that type, including subobjects of that type within unions, structures or arrays. And the following to F.7.5: 3 The value of zero used for implicit initialization shall be the positive zero.