lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Em seg., 9 de nov. de 2020 às 21:39, Ką Mykolas <kamicc@gmail.com> escreveu:
On Mon, Nov 9, 2020 at 7:22 PM Ranier Vilela <ranier.vf@gmail.com> wrote:
> I never see any platform that NULL is not all-zeroes representation.

Well, Antonin mentioned obscure machines, but check out this LLVM
thread [1] about non-zero NULL on AMD GCN (OpenCL system).
In terms of time, it is not as old and obscure, just... behaves
differently on different address spaces.

[1] https://reviews.llvm.org/D26196
Ok, Makes sense to not use 0.
In fact, I never use 0 with pointers, but I've seen a lot of code like this.
Including IUP Lua.
Why not memset with (int) NULL, wouldn't work?

regards,
Ranier Vilela