From: Paul Eggert Date: Mon, 31 Aug 2020 07:15:22 +0000 (-0700) Subject: * src/alloc.c (live_symbol_holding): Pacify gcc -Wlogical-op. X-Git-Tag: emacs-28.0.90~6303 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4830ef2f65ad32ba457708d398106a65e4a35141;p=emacs.git * src/alloc.c (live_symbol_holding): Pacify gcc -Wlogical-op. --- diff --git a/src/alloc.c b/src/alloc.c index 6b5bfcbd93a..b12922b5858 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -4539,9 +4539,9 @@ live_symbol_holding (struct mem_node *m, void *p) ptrdiff_t off = offset % sizeof b->symbols[0]; if (off == Lisp_Symbol - /* Use u's offset since '|| off == 0' would run afoul of gcc + /* Plain '|| off == 0' would run afoul of GCC 10.2 -Wlogical-op, as Lisp_Symbol happens to be zero. */ - || off == offsetof (struct Lisp_Symbol, u) + || (Lisp_Symbol != 0 && off == 0) || off == offsetof (struct Lisp_Symbol, u.s.name) || off == offsetof (struct Lisp_Symbol, u.s.val)