3 ms·
wait what? my C is a bit rusty but when would reading 0 from memory & casting to a (void?) pointer type ever != NULL?
by adamrezich 6y ago
wait what? my C is a bit rusty but when would reading 0 from memory & casting to a (void?) pointer type ever != NULL?
- layer8 6y agoC implementations are allowed to use a not-all-bits-zero representation for null pointer values. They are merely required to convert integer constant expressions with value zero to a null pointer value — regardless of how the resulting null pointer value is represented in memory. See also these FAQs: http://c-faq.com/null/machnon0.html http://c-faq.com/null/machnon0.html http://c-faq.com/null/machexamp.html http://c-faq.com/null/machexamp.html