]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/alloc.c (live_symbol_holding): Pacify gcc -Wlogical-op.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 31 Aug 2020 07:15:22 +0000 (00:15 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 31 Aug 2020 07:15:53 +0000 (00:15 -0700)
src/alloc.c

index 6b5bfcbd93a16ed779a17e9b8bd66a556b353992..b12922b58581cf94c49eea4b029ec514df437b43 100644 (file)
@@ -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)