lua-users home
lua-l archive

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

On 1/21/2012 5:46 AM, Xavier Wang wrote:
2012/1/21 KHMan:
On 1/21/2012 2:28 AM, Roberto Ierusalimschy wrote:

I stumbled upon a weird behaviour in hexadecimal constants in Lua
5.2.0 (and LuaJIT 2.0.0-beta8).



stdin:1: malformed number near '0xE+9'

I guess this patch solves the problem:

--- llex.c      2011/11/30 12:43:51     2.59
+++ llex.c      2012/01/20 18:22:50
@@ -223,12 +223,19 @@

Works for me. A different but minor issue appeared when building for mingw.
When building after changing a single file, make fails because gcc -shared
is being used as AR and the $? is incorrect when used that way. Only mingw
seems to be built this way.

Make output:
[snip snip]

that's because in lua's makefile generate MinGW dll using a $? sign.
it will work if you try again.

(1) First "make mingw" attempt:
    (a) dependency for llex.o, gets llex.o built
    (b) throws an error on "gcc -shared -o lua52.dll llex.o",
        since only llex.o is the newer dependency
    (c) lua52.dll is left missing

(2) Second "make mingw" attempt:
    (a) dependency is for lua52.dll, and since it is missing,
        all relevant object files are correctly taken for $?
    (b) lua52.dll gets built


  The names of all the prerequisites that are newer
  than the target, with spaces between them.  For
  prerequisites which are archive members, only the
  member named is used (*note Archives::).

Thus this is a low severity bug and I had a duty to report it. Enlighten me if you think otherwise.

Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia