7.3.16 The NULL Macro
The NULL macro is defined by <stddef.h>
; however, its definition
is implementation-defined. Under the CCI, the definition of
NULL
is the expression (0)
.
Example
The following shows a pointer being assigned a null pointer constant via the
NULL
macro.
int * ip = NULL;
The value of NULL
, (0)
, is implicitly converted to the
destination type.
Differences
MPLAB XC32 has assigned NULL
the expression ((void
*)0)
. The same is true for MPLAB XC8 when targeting AVR MCUs.
Migration to the CCI
No action required.