all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs release branch warnings with GCC 8
@ 2018-04-30 17:12 Paul Eggert
  2018-04-30 19:38 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggert @ 2018-04-30 17:12 UTC (permalink / raw)
  To: Emacs development discussions

[-- Attachment #1: Type: text/plain, Size: 832 bytes --]

The emacs-26 branch has some warnings when compiled on Fedora 28, which 
is scheduled for release next week; see attached. This is because Fedora 
28 uses GCC 8.0.1, and when --enable-gcc-warnings is used (which is the 
default in a build from Git), GCC 8 issues some warnings that GCC 7 does 
not. I've patched the master to fix this problem in commits 
2b9ab8c8fba849da8bf2aa45e65b122bb937a6b3 and 
8c3215e7a47e3caaa005bf573765ed63e0739b89, and could backport these 
patches (or a subset) to emacs-26 if there's interest.

Only one of the warnings indicates a real bug, one in emacsclient that 
could cause undefined behavior. On the other hand, if we don't pacify 
GCC 8 now we're likely to get bug reports about the warnings for quite 
some time, and it might be less work for everybody involved if we squash 
the warnings now.

[-- Attachment #2: emacs-26.txt --]
[-- Type: text/plain, Size: 18743 bytes --]

1003-Penguin $ make
make -C lib all
make[1]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/lib'
  GEN      alloca.h
  GEN      dirent.h
  GEN      fcntl.h
  GEN      inttypes.h
  GEN      limits.h
  GEN      signal.h
  GEN      stdio.h
  GEN      stdlib.h
  GEN      string.h
  GEN      sys/select.h
  GEN      sys/stat.h
  GEN      sys/time.h
  GEN      sys/types.h
  GEN      time.h
  GEN      unistd.h
  CC       fcntl.o
  CC       sig2str.o
  CC       time_rz.o
  CC       acl-errno-valid.o
  CC       acl-internal.o
  CC       get-permissions.o
  CC       set-permissions.o
  CC       allocator.o
  CC       binary-io.o
  CC       c-ctype.o
  CC       c-strcasecmp.o
  CC       c-strncasecmp.o
  CC       careadlinkat.o
  CC       close-stream.o
  CC       count-leading-zeros.o
  CC       count-one-bits.o
  CC       count-trailing-zeros.o
  CC       md5.o
  CC       sha1.o
  CC       sha256.o
  CC       sha512.o
  CC       dtoastr.o
  CC       dtotimespec.o
  CC       filemode.o
  CC       filevercmp.o
  CC       gettime.o
  CC       nstrftime.o
  CC       pipe2.o
  CC       qcopy-acl.o
  CC       stat-time.o
  CC       tempname.o
  CC       timespec.o
  CC       timespec-add.o
  CC       timespec-sub.o
  CC       u64.o
  CC       unistd.o
  CC       utimens.o
  CC       openat-die.o
  CC       save-cwd.o
  AR       libgnu.a
  CC       e-fcntl.o
  CC       e-sig2str.o
  CC       e-time_rz.o
  CC       e-acl-errno-valid.o
  CC       e-acl-internal.o
  CC       e-get-permissions.o
  CC       e-set-permissions.o
  CC       e-allocator.o
  CC       e-binary-io.o
  CC       e-c-ctype.o
  CC       e-c-strcasecmp.o
  CC       e-c-strncasecmp.o
  CC       e-careadlinkat.o
  CC       e-close-stream.o
  CC       e-count-leading-zeros.o
  CC       e-count-one-bits.o
  CC       e-count-trailing-zeros.o
  CC       e-md5.o
  CC       e-sha1.o
  CC       e-sha256.o
  CC       e-sha512.o
  CC       e-dtoastr.o
  CC       e-dtotimespec.o
  CC       e-filemode.o
  CC       e-filevercmp.o
  CC       e-gettime.o
  CC       e-nstrftime.o
  CC       e-pipe2.o
  CC       e-qcopy-acl.o
  CC       e-stat-time.o
  CC       e-tempname.o
  CC       e-timespec.o
  CC       e-timespec-add.o
  CC       e-timespec-sub.o
  CC       e-u64.o
  CC       e-unistd.o
  CC       e-utimens.o
  CC       e-openat-die.o
  CC       e-save-cwd.o
  AR       libegnu.a
make[1]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/lib'
make -C lib-src all
make[1]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/lib-src'
  CC       regex.o
../src/regex.c: In function ‘analyze_first’:
../src/regex.c:4027:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
    switch (*p)
    ^~~~~~
../src/regex.c:4043:2: note: here
  case on_failure_jump:
  ^~~~
  CCLD     etags
  CCLD     ctags
  CCLD     emacsclient
emacsclient.c: In function ‘fail’:
emacsclient.c:732:7: warning: potential null pointer dereference [-Wnull-dereference]
       execvp (*new_argv, new_argv);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
emacsclient.c:732:7: warning: potential null pointer dereference [-Wnull-dereference]
  CCLD     ebrowse
  CCLD     profile
  CCLD     hexl
  CC       pop.o
  CCLD     movemail
  CCLD     make-docfile
make[1]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/lib-src'
make -C src VCSWITNESS='$(srcdir)/../.git/logs/HEAD' all
make[1]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/src'
  GEN      lisp.mk
  GEN      globals.h
  CC       dispnew.o
  CC       frame.o
  CC       scroll.o
  CC       xdisp.o
  CC       menu.o
In file included from menu.c:48:
menu.h:33:1: warning: ‘const’ attribute on function returning ‘void’ [-Wattributes]
 extern void finish_menu_items (void) ATTRIBUTE_CONST;
 ^~~~~~
  CC       xmenu.o
In file included from xmenu.c:101:
menu.h:33:1: warning: ‘const’ attribute on function returning ‘void’ [-Wattributes]
 extern void finish_menu_items (void) ATTRIBUTE_CONST;
 ^~~~~~
  CC       window.o
  CC       charset.o
  CC       coding.o
  CC       category.o
  CC       ccl.o
  CC       character.o
  CC       chartab.o
  CC       bidi.o
  CC       cm.o
  CC       term.o
In file included from term.c:58:
menu.h:33:1: warning: ‘const’ attribute on function returning ‘void’ [-Wattributes]
 extern void finish_menu_items (void) ATTRIBUTE_CONST;
 ^~~~~~
  CC       terminal.o
  CC       xfaces.o
  CC       xterm.o
In file included from xterm.c:81:
menu.h:33:1: warning: ‘const’ attribute on function returning ‘void’ [-Wattributes]
 extern void finish_menu_items (void) ATTRIBUTE_CONST;
 ^~~~~~
  CC       xfns.o
  CC       xselect.o
  CC       xrdb.o
  CC       xsmfns.o
  CC       xsettings.o
  CC       gtkutil.o
  CC       emacsgtkfixed.o
  CC       dbusbind.o
  CC       emacs.o
  CC       keyboard.o
  CC       macros.o
  CC       keymap.o
  CC       sysdep.o
  CC       buffer.o
  CC       filelock.o
  CC       insdel.o
  CC       marker.o
  CC       minibuf.o
  CC       fileio.o
  CC       dired.o
  CC       cmds.o
  CC       casetab.o
  CC       casefiddle.o
  CC       indent.o
  CC       search.o
  CC       regex.o
regex.c: In function ‘analyze_first’:
regex.c:4027:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
    switch (*p)
    ^~~~~~
regex.c:4043:2: note: here
  case on_failure_jump:
  ^~~~
  CC       undo.o
  CC       alloc.o
  CC       data.o
  GEN      buildobj.h
  CC       doc.o
  CC       editfns.o
  CC       callint.o
  CC       eval.o
  CC       floatfns.o
  CC       fns.o
  CC       font.o
  CC       print.o
  CC       lread.o
  CC       syntax.o
  CC       unexelf.o
  CC       bytecode.o
  CC       process.o
  CC       gnutls.o
  CC       callproc.o
  CC       region-cache.o
  CC       sound.o
  CC       atimer.o
  CC       doprnt.o
  CC       intervals.o
  CC       textprop.o
  CC       composite.o
  CC       xml.o
  CC       lcms.o
  CC       inotify.o
  CC       profiler.o
  CC       decompress.o
  CC       thread.o
  CC       systhread.o
  CC       sheap.o
  CC       xfont.o
  CC       ftfont.o
  CC       xftfont.o
  CC       ftxfont.o
  CC       fontset.o
  CC       fringe.o
  CC       image.o
  CC       xgselect.o
  CC       terminfo.o
  CC       lastfile.o
  CC       gmalloc.o
make -C ../admin/charsets all
make[2]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/admin/charsets'
  GEN      ../../etc/charsets/JISX2131.map
  GEN      charsets.stamp
make[2]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/admin/charsets'
make -C ../admin/unidata charscript.el
make[2]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/admin/unidata'
make[2]: Nothing to be done for 'charscript.el'.
make[2]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/admin/unidata'
  CCLD     temacs
/usr/bin/mkdir -p ../etc
setfattr -n user.pax.flags -v er temacs
make -C ../lisp update-subdirs
make[2]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/lisp'
make[2]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/lisp'
./temacs --batch  --load loadup bootstrap
Loading loadup.el (source)...
Using load-path (/home/eggert/src/gnu/emacs/emacs-26-sc/lisp /home/eggert/src/gnu/emacs/emacs-26-sc/lisp/emacs-lisp /home/eggert/src/gnu/emacs/emacs-26-sc/lisp/progmodes /home/eggert/src/gnu/emacs/emacs-26-sc/lisp/language /home/eggert/src/gnu/emacs/emacs-26-sc/lisp/international /home/eggert/src/gnu/emacs/emacs-26-sc/lisp/textmodes /home/eggert/src/gnu/emacs/emacs-26-sc/lisp/vc)
Loading emacs-lisp/byte-run...
Loading emacs-lisp/backquote...
Loading subr...
Loading version...
Loading widget...
Loading custom...
Loading emacs-lisp/map-ynp...
Loading international/mule...
Loading international/mule-conf...
Loading env...
Loading format...
Loading bindings...
Loading window...
Loading files...
Loading emacs-lisp/macroexp...
Loading cus-face...
Loading faces...
Loading button...
Loading /home/eggert/src/gnu/emacs/emacs-26-sc/lisp/loaddefs.el (source)...
Loading emacs-lisp/nadvice...
Loading emacs-lisp/cl-preloaded...
Loading minibuffer...
Loading obarray...
Loading abbrev...
Loading /home/eggert/src/gnu/emacs/emacs-26-sc/lisp/simple.el (source)...
Loading help...
Loading jka-cmpr-hook...
Loading epa-hook...
Loading international/mule-cmds...
Loading case-table...
Loading /home/eggert/src/gnu/emacs/emacs-26-sc/lisp/international/charprop.el (source)...
Loading international/characters...
Loading composite...
Loading language/chinese...
Loading language/cyrillic...
Loading language/indian...
Loading language/sinhala...
Loading language/english...
Loading language/ethiopic...
Loading language/european...
Loading language/czech...
Loading language/slovak...
Loading language/romanian...
Loading language/greek...
Loading language/hebrew...
Loading international/cp51932...
Loading international/eucjp-ms...
Loading language/japanese...
Loading language/korean...
Loading language/lao...
Loading language/tai-viet...
Loading language/thai...
Loading language/tibetan...
Loading language/vietnamese...
Loading language/misc-lang...
Loading language/utf-8-lang...
Loading language/georgian...
Loading language/khmer...
Loading language/burmese...
Loading language/cham...
Loading indent...
Loading emacs-lisp/cl-generic...
Loading frame...
Loading startup...
Loading term/tty-colors...
Loading font-core...
Loading facemenu...
Loading emacs-lisp/syntax...
Loading font-lock...
Loading jit-lock...
Loading mouse...
Loading scroll-bar...
Loading select...
Loading emacs-lisp/timer...
Loading isearch...
Loading rfn-eshadow...
Loading menu-bar...
Loading emacs-lisp/lisp...
Loading textmodes/page...
Loading register...
Loading textmodes/paragraphs...
Loading progmodes/prog-mode...
Loading emacs-lisp/lisp-mode...
Loading progmodes/elisp-mode...
Loading textmodes/text-mode...
Loading textmodes/fill...
Loading newcomment...
Loading replace...
Loading emacs-lisp/tabulated-list...
Loading buff-menu...
Loading fringe...
Loading emacs-lisp/regexp-opt...
Loading image...
Loading international/fontset...
Loading dnd...
Loading tool-bar...
Loading dynamic-setting...
Loading x-dnd...
Loading term/common-win...
Loading term/x-win...
Loading mwheel...
Loading emacs-lisp/float-sup...
Loading vc/vc-hooks...
Loading vc/ediff-hook...
Loading uniquify...
Loading electric...
Loading emacs-lisp/eldoc...
Loading cus-start...
Loading tooltip...
Loading /home/eggert/src/gnu/emacs/emacs-26-sc/lisp/leim/leim-list.el (source)...
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under the name emacs
13536192 of 33554432 static heap bytes used
97503 pure bytes used
mv -f emacs bootstrap-emacs
make -C ../lisp compile-first EMACS="../src/bootstrap-emacs"
make[2]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/lisp'
make[2]: Nothing to be done for 'compile-first'.
make[2]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/lisp'
make -C ../lisp autoloads EMACS="../src/bootstrap-emacs"
make[2]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/lisp'
make -C ../leim all EMACS="../src/bootstrap-emacs"
make[3]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/leim'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/leim'
make -C ../admin/grammars all EMACS="../../src/bootstrap-emacs"
make[3]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/admin/grammars'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/admin/grammars'
  GEN      calendar/hol-loaddefs.el
Directories for loaddefs: . ./calc ./calendar ./cedet ./cedet/ede ./cedet/semantic ./cedet/semantic/analyze ./cedet/semantic/bovine ./cedet/semantic/decorate ./cedet/semantic/symref ./cedet/semantic/wisent ./cedet/srecode ./emacs-lisp ./emulation ./erc ./eshell ./gnus ./image ./international ./language ./leim ./leim/ja-dic ./leim/quail ./mail ./mh-e ./net ./nxml ./org ./play ./progmodes ./textmodes ./url ./vc
  GEN      loaddefs.el
make[2]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/lisp'
make -C ../admin/unidata all EMACS="../../src/bootstrap-emacs"
make[2]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/admin/unidata'
  ELC      uvs.elc

In uvs-dump:
uvs.el:179:22:Warning: ‘string-to-unibyte’ is an obsolete function (as of
    26.1); use ‘encode-coding-string’.
uvs.el:182:4:Warning: ‘string-to-unibyte’ is an obsolete function (as of
    26.1); use ‘encode-coding-string’.
  ELC      unidata-gen.elc
  GEN      unidata.txt
make[2]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/admin/unidata'
make -C ../admin/charsets cp51932.el
make[2]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/admin/charsets'
make[2]: Nothing to be done for 'cp51932.el'.
make[2]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/admin/charsets'
make -C ../admin/charsets eucjp-ms.el
make[2]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/admin/charsets'
make[2]: Nothing to be done for 'eucjp-ms.el'.
make[2]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/admin/charsets'
make[2]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/lisp'
  ELC      ../lisp/simple.elc
Reloading stale loaddefs.el
Loading /home/eggert/src/gnu/emacs/emacs-26-sc/lisp/loaddefs.el (source)...
make[2]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/lisp'
  GEN      ../etc/DOC
LC_ALL=C ./temacs -batch  -l loadup dump
Loading loadup.el (source)...
Using load-path (/home/eggert/src/gnu/emacs/emacs-26-sc/lisp)
Loading emacs-lisp/byte-run...
Loading emacs-lisp/backquote...
Loading subr...
Loading version...
Loading widget...
Loading custom...
Loading emacs-lisp/map-ynp...
Loading international/mule...
Loading international/mule-conf...
Loading env...
Loading format...
Loading bindings...
Loading window...
Loading files...
Loading emacs-lisp/macroexp...
Loading cus-face...
Loading faces...
Loading button...
Loading loaddefs.el (source)...
Loading emacs-lisp/nadvice...
Loading emacs-lisp/cl-preloaded...
Loading minibuffer...
Loading obarray...
Loading abbrev...
Loading simple...
Loading help...
Loading jka-cmpr-hook...
Loading epa-hook...
Loading international/mule-cmds...
Loading case-table...
Loading international/charprop.el (source)...
Loading international/characters...
Loading international/charscript...
Loading composite...
Loading language/chinese...
Loading language/cyrillic...
Loading language/indian...
Loading language/sinhala...
Loading language/english...
Loading language/ethiopic...
Loading language/european...
Loading language/czech...
Loading language/slovak...
Loading language/romanian...
Loading language/greek...
Loading language/hebrew...
Loading international/cp51932...
Loading international/eucjp-ms...
Loading language/japanese...
Loading language/korean...
Loading language/lao...
Loading language/tai-viet...
Loading language/thai...
Loading language/tibetan...
Loading language/vietnamese...
Loading language/misc-lang...
Loading language/utf-8-lang...
Loading language/georgian...
Loading language/khmer...
Loading language/burmese...
Loading language/cham...
Loading indent...
Loading emacs-lisp/cl-generic...
Loading frame...
Loading startup...
Loading term/tty-colors...
Loading font-core...
Loading facemenu...
Loading emacs-lisp/syntax...
Loading font-lock...
Loading jit-lock...
Loading mouse...
Loading scroll-bar...
Loading select...
Loading emacs-lisp/timer...
Loading isearch...
Loading rfn-eshadow...
Loading menu-bar...
Loading emacs-lisp/lisp...
Loading textmodes/page...
Loading register...
Loading textmodes/paragraphs...
Loading progmodes/prog-mode...
Loading emacs-lisp/lisp-mode...
Loading progmodes/elisp-mode...
Loading textmodes/text-mode...
Loading textmodes/fill...
Loading newcomment...
Loading replace...
Loading emacs-lisp/tabulated-list...
Loading buff-menu...
Loading fringe...
Loading emacs-lisp/regexp-opt...
Loading image...
Loading international/fontset...
Loading dnd...
Loading tool-bar...
Loading dynamic-setting...
Loading x-dnd...
Loading term/common-win...
Loading term/x-win...
Loading mwheel...
Loading emacs-lisp/float-sup...
Loading vc/vc-hooks...
Loading vc/ediff-hook...
Loading uniquify...
Loading electric...
Loading emacs-lisp/eldoc...
Loading cus-start...
Loading tooltip...
Loading leim/leim-list.el (source)...
Waiting for git...
Finding pointers to doc strings...
Finding pointers to doc strings...done
Pure-hashed: 15476 strings, 4061 vectors, 40274 conses, 3922 bytecodes, 176 others
Dumping under the name emacs
11955136 of 33554432 static heap bytes used
2446951 pure bytes used
Adding name emacs-26.1.1
ln -f emacs bootstrap-emacs
make[1]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/src'
make -C lisp all
make[1]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/lisp'
make -C ../leim all EMACS="../src/emacs"
make[2]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/leim'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/leim'
make -C ../admin/grammars all EMACS="../../src/emacs"
make[2]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/admin/grammars'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/admin/grammars'
make[2]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/lisp'
  ELC      term.elc
  ELC      textmodes/flyspell.elc
make[2]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/lisp'
make[1]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/lisp'
make info-real info-dir
make[1]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc'
make -C doc/lispref info
make[2]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/doc/lispref'
make[2]: Nothing to be done for 'info'.
make[2]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/doc/lispref'
make -C doc/lispintro info
make[2]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/doc/lispintro'
make[2]: Nothing to be done for 'info'.
make[2]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/doc/lispintro'
make -C doc/emacs info
make[2]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/doc/emacs'
make[2]: Nothing to be done for 'info'.
make[2]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/doc/emacs'
make -C doc/misc info
make[2]: Entering directory '/home/eggert/src/gnu/emacs/emacs-26-sc/doc/misc'
make[2]: Nothing to be done for 'info'.
make[2]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc/doc/misc'
make[1]: Nothing to be done for 'info-dir'.
make[1]: Leaving directory '/home/eggert/src/gnu/emacs/emacs-26-sc'

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Emacs release branch warnings with GCC 8
  2018-04-30 17:12 Emacs release branch warnings with GCC 8 Paul Eggert
@ 2018-04-30 19:38 ` Eli Zaretskii
  2018-04-30 19:52   ` Paul Eggert
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2018-04-30 19:38 UTC (permalink / raw)
  To: Paul Eggert; +Cc: emacs-devel

> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Mon, 30 Apr 2018 10:12:36 -0700
> 
> The emacs-26 branch has some warnings when compiled on Fedora 28, which 
> is scheduled for release next week; see attached. This is because Fedora 
> 28 uses GCC 8.0.1, and when --enable-gcc-warnings is used (which is the 
> default in a build from Git), GCC 8 issues some warnings that GCC 7 does 
> not.

But a release tarball is not built with --enable-gcc-warnings by
default, right?

> I've patched the master to fix this problem in commits 
> 2b9ab8c8fba849da8bf2aa45e65b122bb937a6b3 and 
> 8c3215e7a47e3caaa005bf573765ed63e0739b89, and could backport these 
> patches (or a subset) to emacs-26 if there's interest.

I'm okay with the first one, but I don't understand how the warnings
you've shown are related to the ATTRIBUTE_MALLOC changes in the second
commit.  If those are not necessary to shut up warnings, I'd prefer
not to backport those, as the attribute stuff can be a potential
portability problem.

Thanks.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Emacs release branch warnings with GCC 8
  2018-04-30 19:38 ` Eli Zaretskii
@ 2018-04-30 19:52   ` Paul Eggert
  2018-04-30 19:58     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggert @ 2018-04-30 19:52 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On 04/30/2018 12:38 PM, Eli Zaretskii wrote:
> But a release tarball is not built with --enable-gcc-warnings by
> default, right?

Right. This is about people who build from a release tarball with 
--enable-gcc-warnings, and about people who build from Git (the latter 
appear to be a growing number....).

>
>> I've patched the master to fix this problem in commits
>> 2b9ab8c8fba849da8bf2aa45e65b122bb937a6b3 and
>> 8c3215e7a47e3caaa005bf573765ed63e0739b89, and could backport these
>> patches (or a subset) to emacs-26 if there's interest.
> I'm okay with the first one, but I don't understand how the warnings
> you've shown are related to the ATTRIBUTE_MALLOC changes in the second
> commit.

The first commit enables -Wsuggest-attribute=malloc, and the 
ATTRIBUTE_MALLOC changes in the second commit then pacifies GCC in that 
area. We could change the first commit to not enable 
-Wsuggest-attribute=malloc and this would simplify the second commit, 
though we'd then be differing from Gnulib in the first commit.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Emacs release branch warnings with GCC 8
  2018-04-30 19:52   ` Paul Eggert
@ 2018-04-30 19:58     ` Eli Zaretskii
  2018-05-01  0:22       ` Paul Eggert
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2018-04-30 19:58 UTC (permalink / raw)
  To: Paul Eggert; +Cc: emacs-devel

> Cc: emacs-devel@gnu.org
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Mon, 30 Apr 2018 12:52:59 -0700
> 
> The first commit enables -Wsuggest-attribute=malloc, and the 
> ATTRIBUTE_MALLOC changes in the second commit then pacifies GCC in that 
> area. We could change the first commit to not enable 
> -Wsuggest-attribute=malloc and this would simplify the second commit, 
> though we'd then be differing from Gnulib in the first commit.

I'd prefer to leave -Wsuggest-attribute=malloc out on the release
branch, for now.  We could add that after 26.1 is released, hopefully
soon.

Thanks.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Emacs release branch warnings with GCC 8
  2018-04-30 19:58     ` Eli Zaretskii
@ 2018-05-01  0:22       ` Paul Eggert
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Eggert @ 2018-05-01  0:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 293 bytes --]

On 04/30/2018 12:58 PM, Eli Zaretskii wrote:
> I'd prefer to leave -Wsuggest-attribute=malloc out on the release
> branch, for now.

OK, I installed the attached backport into the emacs-26 branch; it does 
the minimum to silence the diagnostics, without adding the new GCC 8 
warning options.

[-- Attachment #2: 0001-Port-enable-gcc-warnings-to-GCC-8.patch --]
[-- Type: text/x-patch, Size: 2448 bytes --]

From 65ac27783a959a8339c2aab0f1e54d9b508a1f1f Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Mon, 30 Apr 2018 17:17:11 -0700
Subject: [PATCH] Port --enable-gcc-warnings to GCC 8

Backport from master.
* lib-src/emacsclient.c (fail):
Do not dereference a null pointer.
* src/frame.c (delete_frame):
Add a decl with UNINIT to work around GCC bug 85563.
* src/menu.h (finish_menu_items):
Do not use attribute const.
* src/regex.c (analyze_first): Use FALLTHROUGH, not a comment.
---
 lib-src/emacsclient.c | 2 +-
 src/frame.c           | 1 +
 src/menu.h            | 2 +-
 src/regex.c           | 3 +--
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 574bec850f..b139b2fe3f 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -700,7 +700,7 @@ fail (void)
     {
       size_t extra_args_size = (main_argc - optind + 1) * sizeof (char *);
       size_t new_argv_size = extra_args_size;
-      char **new_argv = NULL;
+      char **new_argv = xmalloc (new_argv_size);
       char *s = xstrdup (alternate_editor);
       unsigned toks = 0;
 
diff --git a/src/frame.c b/src/frame.c
index cee775c6fa..0a6ca26f5d 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1933,6 +1933,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
   if (f == sf)
     {
       Lisp_Object tail;
+      Lisp_Object frame1 UNINIT;  /* This line works around GCC bug 85563.  */
       eassume (CONSP (Vframe_list));
 
       /* Look for another visible frame on the same terminal.
diff --git a/src/menu.h b/src/menu.h
index 4c4ac83424..1aa53f7454 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -30,7 +30,7 @@ enum {
 };
 
 extern void init_menu_items (void);
-extern void finish_menu_items (void) ATTRIBUTE_CONST;
+extern void finish_menu_items (void);
 extern void discard_menu_items (void);
 extern void save_menu_items (void);
 extern bool parse_single_submenu (Lisp_Object, Lisp_Object, Lisp_Object);
diff --git a/src/regex.c b/src/regex.c
index e8b99f6f02..4f9df68a9f 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -4038,8 +4038,7 @@ analyze_first (const_re_char *p, const_re_char *pend, char *fastmap,
 	    };
 	  /* Keep `p1' to allow the `on_failure_jump' we are jumping to
 	     to jump back to "just after here".  */
-	  /* Fallthrough */
-
+	  FALLTHROUGH;
 	case on_failure_jump:
 	case on_failure_keep_string_jump:
 	case on_failure_jump_nastyloop:
-- 
2.17.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-05-01  0:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-30 17:12 Emacs release branch warnings with GCC 8 Paul Eggert
2018-04-30 19:38 ` Eli Zaretskii
2018-04-30 19:52   ` Paul Eggert
2018-04-30 19:58     ` Eli Zaretskii
2018-05-01  0:22       ` Paul Eggert

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.