emacs-devel
[Top][All Lists]
Advanced

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

Re: Bignum speedup patch causes crash at startup


From: Paul Eggert
Subject: Re: Bignum speedup patch causes crash at startup
Date: Tue, 4 Sep 2018 13:48:10 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Andy Moreton wrote:
I now see a strange warning on 64bit Windows (building with gcc 8.2.0
for target x86_64-w64-mingw32):

   CC       data.o
In file included from C:/emacs/git/emacs/master/src/data.c:31:
C:/emacs/git/emacs/master/src/data.c: In function 'arith_driver':
C:/emacs/git/emacs/master/src/lisp.h:2479:34: warning: 'accum' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
    return FIXNUM_OVERFLOW_P (n) ? make_bigint (n) : make_fixnum (n);
                                   ^~~~~~~~~~~~~~~
C:/emacs/git/emacs/master/src/data.c:2962:12: note: 'accum' was declared here
    intmax_t accum = XFIXNUM (val);

GCC complains that 'accum' might be used uninitialized even though 'accum's declaration has an initializer? Looks like a clear GCC bug, and might be worth reporting there.

For what it's worth I don't observe the problem on RHEL 7 x86-64, building with GCC 8.2.0 (which I built myself for x86_64-pc-linux-gnu) and configuring Emacs with './configure --enable-gcc-warnings --with-gif=no'.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]