Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Make possible to override LUA_32BITS as requested #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

illwieckz
Copy link
Member

Make possible to override LUA_32BITS, Lua itself raises an error message saying to override LUA_32BITS, so redefining it unconditionally it is a bug.

lua/luaconf.h:125:9: warning: 'LUA_32BITS' macro redefined [-Wmacro-redefined]
  125 | #define LUA_32BITS      0
      |         ^
<command line>:9:9: note: previous definition is here
    9 | #define LUA_32BITS 1
      |         ^
In file included from lua/lapi.c:17:
In file included from lua/lua.h:16:
lua/luaconf.h:572:2: error: "Compiler does not support 'long long'. Use option '-DLUA_32BITS'   or '-DLUA_C89_NUMBERS' (see file 'luaconf.h' for details)"
  572 | #error "Compiler does not support 'long long'. Use option '-DLUA_32BITS' \
      |  ^

Make possible to override LUA_32BITS, Lua itself raises an error message saying to override LUA_32BITS, so redefining it unconditionally it is a bug.

lua/luaconf.h:125:9: warning: 'LUA_32BITS' macro redefined [-Wmacro-redefined]
  125 | #define LUA_32BITS      0
      |         ^
<command line>:9:9: note: previous definition is here
    9 | #define LUA_32BITS 1
      |         ^
In file included from lua/lapi.c:17:
In file included from lua/lua.h:16:
lua/luaconf.h:572:2: error: "Compiler does not support 'long long'. Use option '-DLUA_32BITS'   or '-DLUA_C89_NUMBERS' (see file 'luaconf.h' for details)"
  572 | #error "Compiler does not support 'long long'. Use option '-DLUA_32BITS' \
      |  ^
@slipher
Copy link

slipher commented Nov 24, 2024

Standard Lua uses 64-bit integers and double-precision (64-bit) floats, but you can also compile Lua so that it uses 32-bit integers and/or single-precision (32-bit) floats. The option with 32 bits for both integers and floats is particularly attractive for small machines and embedded systems. (See macro LUA_32BITS in file luaconf.h.)

-- https://www.lua.org/manual/5.3/manual.html

What's wrong with standard Lua? I don't think we want to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants