lua-users home
lua-l archive

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


Ashish Ranjan  wrote:
Hi Roberto and all,
In redhat 8, gcc and g++ version 3.2 are included. When we compile
lua5beta with gcc it compiles easily . But when we compile it with
g++, it gives many errors as following:

In file included from lvm.c:32:
/usr/include/stdio.h:473:54: macro "getline" passed 3 arguments, but
takes just 2
In file included from lvm.c:32:
/usr/include/stdio.h:473: syntax error before `throw'
In file included from /usr/include/stdio.h:676,
                 from lvm.c:32:
/usr/include/bits/stdio.h:102:55: macro "getline" passed 3 arguments,
but takes just 2
In file included from /usr/include/stdio.h:676,
                 from lvm.c:32:
/usr/include/bits/stdio.h:102: syntax error before `throw'
In file included from lvm.c:32:
/usr/include/stdio.h:679: parse error before `}' token


Are you sure your g++ installation is OK? these errors seem to come
from stdio.h not from Lua sources.


also, if in Slackware 8 linux, we compile it(lua5beta) with gcc , it
compiles succesfully. but when compiling with g++ it gives errors, as
following:

luac.c: In function `struct Proto * combine(lua_State *, int)':
luac.c:115: warning: ANSI C++ forbids implicit conversion from `void
*' in initialization
luac.c:130: warning: ANSI C++ forbids implicit conversion from `void
*' in initialization

I agree that these should be fixed by adding the casts.


../../lib/liblualib.a(liolib.o): In function `io_tmpname(lua_State *)':
liolib.o(.text+0x106b): the use of `tmpnam' is dangerous, better use
`mkstemp'


This is a known issue which has been discussed. I personally think
Lua should get rid of tmpnam, but the problem is that it is the
only alternative provided by ANSI C, so I can understand why
Lua team has not changed this so far.

		Eero