[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Warnings when building with LTO
From: |
Alex Gramiak |
Subject: |
Warnings when building with LTO |
Date: |
Thu, 09 May 2019 16:49:38 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
Also, with OpenSUSE looking to enable LTO by default[1], it would be
nice to reevaluate LTO's role in Emacs release builds, at least for
modern compilers.
INSTALL states:
Link time optimization is not the default as it tends to cause crashes
and to make Emacs slower.
Is this still true with GCC 9.1? Paul, can you still reproduce the
bug[2] you mentioned in commit 9b4b2e9fc8 with GCC 9.1?
[1]
https://hubicka.blogspot.com/2019/05/gcc-9-link-time-and-inter-procedural.html
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1486455
Build warnings when compiling with --enable-link-time-optimization (with
GCC 8.3.0):
CCLD emacsclient
emacsclient.c: In function ‘local_sockname.constprop’:
emacsclient.c:1335:9: warning: ‘/emacs’ directive output truncated writing 6
bytes into a region of size 1 [-Wformat-truncation=]
"/emacs%"PRIuMAX"/%s", uid, server_name);
^
emacsclient.c:1335:9: note: using the range [0, 18446744073709551615] for
directive argument
emacsclient.c:1335:9: note: assuming directive output of 1 byte
/usr/include/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output 9 or
more bytes (assuming 10) into a destination of size 1
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
CCLD temacs
ftfont.c: In function ‘ftfont_shape’:
lisp.h:1772:13: warning: potential null pointer dereference [-Wnull-dereference]
EMACS_INT size = XBOOL_VECTOR (a)->size;
^
image.c: In function ‘jpeg_load_body’:
image.c:6937:31: warning: variable ‘specified_data’ might be clobbered by
‘longjmp’ or ‘vfork’ [-Wclobbered]
Lisp_Object specified_file, specified_data;
^
image.c: In function ‘png_load_body’:
image.c:6160:31: warning: variable ‘specified_data’ might be clobbered by
‘longjmp’ or ‘vfork’ [-Wclobbered]
Lisp_Object specified_file, specified_data;
^
image.c:6161:9: warning: variable ‘fp’ might be clobbered by ‘longjmp’ or
‘vfork’ [-Wclobbered]
FILE *fp = NULL;
^
regex-emacs.c: In function ‘re_match_2_internal’:
lisp.h:1772:13: warning: potential null pointer dereference [-Wnull-dereference]
EMACS_INT size = XBOOL_VECTOR (a)->size;
^
regex-emacs.c: In function ‘analyze_first’:
lisp.h:1772:13: warning: potential null pointer dereference [-Wnull-dereference]
EMACS_INT size = XBOOL_VECTOR (a)->size;
^
indent.c: In function ‘position_indentation’:
lisp.h:1772:13: warning: potential null pointer dereference [-Wnull-dereference]
EMACS_INT size = XBOOL_VECTOR (a)->size;
^
indent.c: In function ‘Fvertical_motion’:
bignum.c:65:40: warning: ‘lcols’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
return mpz_get_d_rounded (XBIGNUM (n)->value);
^
indent.c:2094:15: note: ‘lcols’ was declared here
Lisp_Object lcols;
^
keyboard.c: In function ‘read_char’:
keyboard.c:2314:13: warning: ‘jmpcount’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
ptrdiff_t jmpcount;
^
bytecode.c: In function ‘exec_byte_code’:
bytecode.c:367:9: warning: variable ‘alloc’ might be clobbered by ‘longjmp’ or
‘vfork’ [-Wclobbered]
void *alloc;
- Warnings when building with LTO,
Alex Gramiak <=