In this question an initializer is used to set a pointer to null. Instead of using value of 0 value of 0L is used. I've read that one should use exactly 0 for null pointers because exact null pointer representation is implementation-specific.
Can using 0L to set a pointer to null cause problems while porting?
From the standard (4.10.1):
A null pointer constant is an integral constant expression (5.19) rvalue of integer type that evaluates to zero
so I guess 0L is ok.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With