lua-users home
lua-l archive

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


Dear Lua'ers,

On a Windows 7 machine running 32-bit Cygwin

> $ uname -a
> CYGWIN_NT-6.1-WOW Annette-Pc2 3.1.7(0.340/5/3) 2020-08-22 19:03 i686 Cygwin

with

> $ gcc --version
> gcc (GCC) 10.2.0
> Copyright (C) 2020 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

when compiling lua-5.4.2, I get the following:

> $ make generic
> ...
> gcc -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_3     -c -o lstrlib.o lstrlib.c
> lstrlib.c: In function ‘str_unpack’:
> lstrlib.c:1722:18: warning: ‘u.n’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>  1722 |         else num = u.n;
>       |              ~~~~^~~~~
> ...

Neither with

> $ uname -a
> FreeBSD tn34.thorkilnaur.dk 12.2-RELEASE FreeBSD 12.2-RELEASE r366954 GENERIC  i386
> $ cc -v
> FreeBSD clang version 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2)
> Target: i386-unknown-freebsd12.2
> Thread model: posix
> InstalledDir: /usr/bin

nor with

> $ uname -a
> Linux tn41.thorkilnaur.dk 5.6.13-100.fc30.i686 #1 SMP Fri May 15 00:02:53 UTC 2020 i686 i686 i386 GNU/Linux
> $ gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/9/lto-wrapper
> Target: i686-redhat-linux
> Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
> Thread model: posix
> gcc version 9.3.1 20200408 (Red Hat 9.3.1-2) (GCC)

do I see this warning.

Best regards
Thorkil