[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: bug in gcc?
- From: roberto@... (Roberto Ierusalimschy)
- Date: Wed, 4 Apr 2007 12:41:05 -0300
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
I am using gcc version 4.0.3.