Subject: Re: bug#49261: Segfault during loadup

From: Eli Zaretskii <[email-masked]>
Date: Mon, 12 Jul 2021 18:54:23 +0300

> Cc: [email-masked], [email-masked]
> From: Paul Eggert <[email-masked]>
> Date: Mon, 12 Jul 2021 07:50:41 -0700
> 
> On 7/12/21 5:07 AM, Eli Zaretskii wrote:
> 
> >> 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.
> 
> It's bogus in the sense that 'uintptr_t mask = VALMASK;' has 
> well-defined behavior in C; there is no undefined behavior there, since 
> VALMASK is an integer and uintptr_t is unsigned. And truncation is what 
> is wanted here, so the warning is bogus.

Then what is the -Woverflow option for?  Can you show an example of
code which -Woverflow would flag that doesn't produce a bogus warning?