Re: MSVC warnings when compiling Lua as C++
bil til <[email protected]> Thu, 30 Jul 2026 06:55:08 +0200
| Newsgroups | gmane.comp.lang.lua.general |
|---|---|
| Message-ID | <CAOnDXmHjBnnRknc+BwzZCH_=c6Gvp4mX7khHyE7Ha2FT0ViWxQ@mail.gmail.com> |
Am Mi., 29. Juli 2026 um 22:06 Uhr schrieb 'eugeny gladkih' via lua-l <[email protected]>: > sizeof(int) == 4 > sizeof(long int) == 4 > sizeof(void*) == 8 // or size_t This was the typical nasty (and from my point of view quite ingenious) trick of MSVS-C++, when they introduced 64 bit Windows. They kept the "int" to be 32 bit. Like this older 32bit code, which of course is VERY MUCH code :) , could be translated very easily to 64bit output... . (although of course "strictly spoken" int in a 64bit system should be 64bit ... but for calculations in typical software 32bit is completely sufficient for 99% of computation tasks ... 64bit is then "merely" necessary to handle the 64bit pointer arithmetic, which in typical C++ code the compiler would organize internally anyway...). -- You received this message because you are subscribed to the Google Groups "lua-l" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/lua-l/CAOnDXmHjBnnRknc%2BBwzZCH_%3Dc6Gvp4mX7khHyE7Ha2FT0ViWxQ%40mail.gmail.com.