|
|
Log in / Subscribe / Register

Null pointers, one month later

Null pointers, one month later

Posted Aug 20, 2009 11:47 UTC (Thu) by xilun (guest, #50638)
In reply to: Null pointers, one month later by etienne_lorrain@yahoo.fr
Parent article: Null pointers, one month later

"In fact the C language doesn't know the identifier "NULL", it just knows that its value is zero because the preproceessor defines that."

Wrong:
The fact that the C compiler, preprocessor excluded, does not know about the symbol NULL is irrelevant. NULL is defined as the null pointer constant, and the C language, even preprocessor excluded, does know about the null pointer constant. And even if the null pointer constant can be literally written (in a strictly conforming program) as (void*)0, that does not mean that the representation of the null pointer constant must be zero.


The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:

Note: you can avoid this step in the future by logging into your LWN account.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds