Re: What is a null pointer constant?



Jun Woong wrote:
....
> and do not forget that a s.c. program can stringize NULL and check
> at least whether it is equal to "((void *)0.0)".

The question of whether or not conformance can be checked in that
fashion has been raised many times.

On 2001-02-17 Clive D. W. Feather wrote:
> In article <3A8DB0BE.538242B3@xxxxxxxxxxxx>, Douglas A. Gwyn
> <gwyn@xxxxxxxxxxxx> writes
> >> > > > ... there was a strong consensus that strict program conformance
> >> > > > is not affected by what the standard macros expand to.
>
> >It ought to be in 7.1.2 Standard headers, but I don't see it.
> >I'm pretty sure we responded to at least one DR along those lines.
>
> DR044 question 2.
>
> | A conforming implementation need not provide strictly conforming
> | expansion of macros defined by the standard headers.


Back to Jun Woong:
> I believe that the "implementation-defined" wording given to the NPC
> is intended to requrie implementations to document their choices, not
> to allow them to exploit it in order to provide their own forms of
> the NPC.

I agree.

.



Relevant Pages

  • Re: Bounds checking and safety in C
    ... conforming but that a conforming implementation must accept. ... would be to output a warning that there is a bounds violation ... could be shown at compile time to violate bounds exists. ...
    (comp.lang.c)
  • Re: Bounds checking and safety in C
    ... conforming but that a conforming implementation must accept. ... have bounds violations, all this means is that the compiler ... could be shown at compile time to violate bounds exists. ...
    (comp.lang.c)
  • Re: switch and many cases. Any caveats?
    ... least 257 case labels per switch, and the "C99" revision raised the ... The Standard requires conforming implementations to accept ... any conforming implementation. ... It is neither a weak guarantee nor a strong guarantee, ...
    (comp.lang.c)
  • Re: Extent of the "as-if" rule
    ... >> That ought to work on a Linux system with the proc filesystem mounted, ... >> but it could be conforming, as far as I can tell. ... sense of doing what I'd like it to do; on many of them the fopens of ... Note that I'm not convinced myself that a conforming implementation ...
    (comp.lang.c)
  • Re: The machine stack and the C language
    ... independence is conforming C code, because a conforming implementation of C can, as an extension, accept it after issuing at least one diagnostic message. ... whether particular code strictly conforms with the standard, whether a particular implementation technique is conforming, how it should be changed, etc.. ...
    (comp.lang.c)