lua-users home
lua-l archive

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


Am 03.01.2015 um 15:23 schröbte Lorenzo Donati:

Compiled with TDM-GCC 4.8.1-32bit under Windows-7 64bit (yes 32 bit
compiler in a 64bit machine) and got some warnings:

--------------------------------------------------
cd src && mingw32-make mingw
mingw32-make[1]: Entering directory
'G:/root/main/core/Lua/install/lua-build/Lua-5.3.0-rc3-newbuild/lua-5.3.0/src'
mingw32-make "LUA_A=lua53.dll" "LUA_T=lua.exe" \
"AR=gcc -std=c99 -shared -o" "RANLIB=strip --strip-unneeded" \
"SYSCFLAGS=-DLUA_BUILD_AS_DLL" "SYSLIBS=" "SYSLDFLAGS=-s" lua.exe
mingw32-make[2]: Entering directory
'G:/root/main/core/Lua/install/lua-build/Lua-5.3.0-rc3-newbuild/lua-5.3.0/src'
gcc -std=c99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_BUILD_AS_DLL    -c
-o lua.o lua.c
lua.c: In function 'pmain':
lua.c:584:5: warning: implicit declaration of function '_fileno'
[-Wimplicit-function-declaration]
      if (lua_stdin_is_tty()) {  /* running in interactive mode? */
      ^

gcc -std=c99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_BUILD_AS_DLL    -c
-o liolib.o liolib.c
liolib.c: In function 'io_pclose':
liolib.c:260:3: warning: implicit declaration of function '_pclose'
[-Wimplicit-function-declaration]
    return luaL_execresult(L, l_pclose(L, p->f));
    ^
liolib.c: In function 'io_popen':
liolib.c:268:3: warning: implicit declaration of function '_popen'
[-Wimplicit-function-declaration]
    p->f = l_popen(L, filename, mode);
    ^
liolib.c:268:8: warning: assignment makes pointer from integer without a
cast [enabled by default]
    p->f = l_popen(L, filename, mode);
         ^

Those are probably the result of the new `-std=c99` flag in the makefile: `-std=c99` implies `__STRICT_ANSI__`, and the above mentioned functions are not declared if `__STRICT_ANSI__` is in effect.

We could replace `-std=c99` with `-std=gnu99` for all architectures, or just append `-std=gnu99` to the compiler command line (after the `-std=c99`) for the mingw target only.


Cheers!

-- Lorenzo


Philipp