[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.4.2 (lua_newstate)
- From: Antonin Décimo <antonin.decimo@...>
- Date: Tue, 10 Nov 2020 01:01:06 +0100
> I never see any platform that NULL is not all-zeroes representation.
Hi!
The infamous comp.lang.c Frequently Asked Questions at
http://c-faq.com has a subsection on null pointers in C
which I find helpful to clarify some C subtleties.
http://c-faq.com/null/
In particular, there's one entry discussing architectures where the
internal representation of the null pointer isn't zero bytes.
http://c-faq.com/null/machexamp.html
One catchy thing that I discovered with this FAQ is that if you
initialize some data containing pointers by writing zero bytes over
it, well you're not *for these architectures* initializing the
pointers to the null pointer (if you were a hacker in the '80s).
Best regards,
-- Antonin