tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: definition of NULL correct?



On Tue, Aug 11, 2009 at 5:46 PM, Arnaud Lacombe<lacombar%gmail.com@localhost> 
wrote:
> I've not been to find anything about NULL in POSIX 2008...
>
my bad, NULL is defined in [0]:

"A pointer obtained by converting an integer constant expression with
the value 0, or such an expression cast to type void *, to a pointer
type; for example, (char *)0. The C language guarantees that a null
pointer compares unequal to a pointer to any object or function, so it
is used by many functions that return pointers to indicate an error."

Though, the issue of the precedence of the cast stays open.

 - Arnaud

[0]: 
http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_244


Home | Main Index | Thread Index | Old Index