bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#49261: Segfault during loadup


From: Eli Zaretskii
Subject: bug#49261: Segfault during loadup
Date: Wed, 14 Jul 2021 15:36:11 +0300

> Cc: larsi@gnus.org, 49261@debbugs.gnu.org
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Tue, 13 Jul 2021 18:12:00 -0500
> 
> On 7/12/21 10:54 AM, Eli Zaretskii wrote:
> > 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?
> 
> Sure: the GCC documentation says -Woverflow is supposed to warn about 
> "compile-time overflow in constant expressions". So GCC should (and
> does) warn about this top-level declaration:
> 
> int x = INT_MAX + 1;
> 
> However, there is no overflow here:
> 
> unsigned a = -1, b = INT_MIN, c = LLONG_MAX;

You are saying that there's some fundamental difference between

  INT_MAX + 1

and

  (USE_LSB_TAG ? - (1 << GCTYPEBITS) : VAL_MAX)

?  Or between an expression 'x = FOO' and 'mask = BAR'?  I don't see
any fundamental difference.  IMO, the warning was valid, as the
assignment loses significant bits.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]