GNU bug report logs - #43764
Calc shift right broken

Previous Next

Package: emacs;

Reported by: Vincent Belaïche <vincent.b.1 <at> hotmail.fr>

Date: Fri, 2 Oct 2020 15:29:02 UTC

Severity: normal

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 43764 <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Vincent Belaïche <vincent.b.1 <at> hotmail.fr>,
 43764 <at> debbugs.gnu.org
Subject: Re: bug#43764: Calc shift right broken
Date: Fri, 9 Oct 2020 17:29:58 +0200
> What about a narrower change: clip the value after shifting right instead of before?

On the other hand it would introduce an inconsistency with arithmetic right shift which ignores bits above the word size.
Thus I will do nothing at all unless Vincent or anyone else speaks up.

However, this bug has already been a success since inspecting the code revealed a bug in the arithmetic right shift that has now been fixed, and there is now a fairly comprehensive test for all binary shift and rotate operations which should make future changes a lot safer and easier.





This bug report was last modified 4 years and 196 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.