lua-users home
lua-l archive

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


I mean the bug is I want to compile lua with -DLUAI_ASSERT and use luac with the same CFLAGS. Since the fix for this is rather straightforward (you can just use pragma puish_macro to redefine the check_exp for those lines or turn them into #defines) and it's something others might also want to do I figured I'd file a report. I can do it myself but that's just another patch on lua to maintain.

-Alex

On Mon, Sep 6, 2021 at 6:13 AM Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
> > If you compile luac with -DLUAI_ASSERT then `luac -l <file>` will no longer work.
>
> Thanks for the report.
> For the time being, add this line at the top of luac.c:
> #undef LUAI_ASSERT

Better yet, you can fix the bug by removing the option -DLUAI_ASSERT.

The LUAI_ASSERT has the following comment:

    Internal assertions for in-house debugging

(The prefix LUAI_, instead of LUA_, also hints that it is not intended
for regular use.)

So, if you use this macro, you are on your own.

-- Roberto