* Alejandro Colomar <alx.manpa...@gmail.com>, 2022-07-24, 21:19:
+.B "#define NULL  ((void *) 0)"
+.fi
+.SH DESCRIPTION
+.B NULL
+represents a null pointer constant.
+.PP
+According to POSIX,
+it shall expand to an integer constant expression with the value
+.B 0
+cast to type
+.IR "void *" .

Might be worth noting that the cast requirement was added only in POSIX.1-2008 aka SUSv4.

+.SH CONFORMING TO
+C99 and later;

It's in C89 too.

+.I NULL \- NULL
+is, surprisingly, undefined behavior, according to ISO C.

FWIW, I don't find it surprising at all.

--
Jakub Wilk

Reply via email to