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 <> escreveu:
On Mon, Nov 9, 2020 at 7:22 PM Ranier Vilela <> 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.

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?

Ranier Vilela