lua-users home
lua-l archive

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

On 7 February 2012 10:40, Martin Guy <> wrote:
> On 7 February 2012 08:57, Marko Lindqvist <> wrote:
>> ../../../../../src.patched/dependencies/lua-5.1/src/ldo.h:25:28: note:
>> instantiated from:
>> #define restorestack(L,n) ((TValue )((char )L->stack + (n)))
>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

> -#define restorestack(L,n)      ((TValue *)((char *)L->stack + (n)))

 I was about to say that you're missing the important part in the
error message and write code to be replaced in your patch in a way
that has no bug. Important thing is that compiler error message has
simple "char" as type to cast, you have pointer "char *". But now that
I look the original code, it's poitner there. So how does the compiler
decide that it's not a pointer!?!
 I'll investigate a bit more if it can somehow get wrong definition of
restrestack() from somewhere (error message clearly states that it's
one from ldo.h line 25, though). This can in fact be compiler bug

 - ML