Creating pointer with all bits 0 (was: Referencing NULL pointers)

Doug Gwyn gwyn at smoke.BRL.MIL
Sun Sep 10 20:49:21 AEST 1989


In article <1989Sep10.040055.10651 at algor2.algorists.com> jeffrey at algor2.UUCP (Jeffrey Kegler) writes:
>1.6 defines an object as "a region of data storage in the execution
>environment, the contents of which can represent values."
>Note this means Doug Gwyn's workaround (having a dummy for the null
>pointer to point to, if worst comes to worst) to 3.2.2.3, while it
>will achieve the intent of the standard, still violates its exact
>wording as quoted above.

Not really, since a null pointer implemented as a dummy would still
be incapable of having contents.  That's the same reason "void" is
not an object type.  They're both special language elements treated
differently from objects by the compiler.

>Can sections of the standard be rewritten in the "interpretation
>phase"?  It seems this might be what it amounts to.

No; the most that can happen is that X3J11 can issue "information
bulletins" containing guidance for interpreting the Standard;
however, such bulletins are not considered (legally?) part of the
Standard.

>[ Aside: In this context 3.1.2.4 reads very strangely.  It says every
>object has one of two storage durations (static and automatic).  It
>goes on to say that the storage duration depends on the declaration,
>apparently assuming every object has one, which of course is not the
>case. ]

I think it meant "every object tagged with an identifier".  It would
be useful for an official ruling on this interpretation..



More information about the Comp.lang.c mailing list