GNU bug report logs -
#49261
28.0.50; File Locking Breaks Presumptuous Toolchains
Previous Next
Reported by: Mallchad Skeghyeph <ncaprisunfan <at> gmail.com>
Date: Mon, 28 Jun 2021 18:28:02 UTC
Severity: normal
Found in version 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #233 received at 49261 <at> debbugs.gnu.org (full text, mbox):
> Cc: larsi <at> gnus.org, 49261 <at> debbugs.gnu.org
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Mon, 12 Jul 2021 00:16:07 -0700
>
> >> lisp.h:251:18: warning: unsigned conversion from 'long long int' to 'uintptr_t' {aka 'unsigned int'} changes value from '2305843009213693951' to '4294967295' [-Woverflow]
> >> 251 | # define VALMASK (USE_LSB_TAG ? - (1 << GCTYPEBITS) : VAL_MAX)
> >> | ^
> >> alloc.c:4767:24: note: in expansion of macro 'VALMASK'
> >> 4767 | uintptr_t mask = VALMASK;
> >> | ^~~~~~~
> > I tried to fix this on master, please take a look.
>
> Yes that GCC warning was bogus, and your pacification of GCC is valid
Hmm... is it really a bogus warning? VALMASK is a 64-bit value, and
uintptr_t is 32-bit wide.
> now that we no longer tag the MSB of pointers. Still, there should be a
> simpler way to pacify GCC so I installed a further fix that I hope does
> that (see first attached patch). This fix simply uses a cast (uintptr_t)
> VALMASK to pacify GCC; if GCC issues a bogus warning even for that cast,
> we could substitute (uintptr_t) (VALMASK & UINTPTR_MAX) though this is
> starting to get a little ridiculous.
Your fix compiles cleanly, thanks.
This bug report was last modified 3 years and 305 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.