LWN.net Logo

NULL v. zero

NULL v. zero

Posted Jul 15, 2004 23:03 UTC (Thu) by ikm (subscriber, #493)
In reply to: NULL v. zero by dvdeug
Parent article: NULL v. zero

It is not a weak type checking, it is the absence of any type checking at all is some cases. It is not the language itself which imposes this absence, it is libraries that do. All that ellipsis functions for instance, as an execl example above. These prototypes doesn't give the compiler any clue about the types at all, so it can't apply any type checking in these cases. In case the compiler knows about types, it will act accordingly, converting zeroes to null pointers when applicable.


(Log in to post comments)

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