lua-users home
lua-l archive

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


hi roberto,

is Lua still write in the subset of C89 and C++03?

long long is C99, so msvc may don't have long long, it use __int64 instead.

what about this, defaultly the lua_Integer is long, in LP64 system, long is 64bit, and long is C89, but we can have

LUA_USE_LONGLONG
or
LUA_USE_INT64

in *nix/MinGW or Windows-MSVC, they just like LUA_USE_AFORMAT, the core part of Lua is still C89. and on embedded system, long is 32bit, it will has better performance.

but the issue is the integer wide of Lua: can Lua use different standard integer on different system?





2013/7/7 Roberto Ierusalimschy <roberto@inf.puc-rio.br>
> i586-mingw32msvc-gcc -O2 -Wall -Wextra -DLUA_COMPAT_ALL     -c -o lvm.o lvm.c
> lvm.c: In function ‘luaV_tostring’:
> lvm.c:57:7: warning: unknown conversion type character ‘l’ in format [-Wformat]

This is strange... "%ld" is quite standard (C89).

-- Roberto




--
regards,
Xavier Wang.