lua-users home
lua-l archive

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

When I compile lpeg (version 0.5) with g++ (that is, as C++ code), I get
the following error:

lpeg.c:395: error: invalid conversion from ‘int’ to ‘const char*’

That line is as follows:

          return luaL_error(L, "too many pending calls/choices"), NULL;

(The function actually returns 'const char *'). If I remove the
LuaL_error call from the expression, the error disapears. (So, it seems
that NULL is still compatible with const char* ;) Parentheses around the
comma expression have no effect. Is this a bug in gcc? Or am I doing
something stupid?

I am using gcc version 4.0.3.

-- Roberto