GNU bug report logs -
#32252
[PATCH] %o and %x now format signed numbers
Previous Next
Reported by: Paul Eggert <eggert <at> cs.ucla.edu>
Date: Mon, 23 Jul 2018 19:14:02 UTC
Severity: normal
Tags: patch
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Why breaking longstanding behavior instead of introducing this with a
> different format specifier. Like %a.
Although it is indeed an incompatible change, I surveyed the existing
Emacs source code and couldn't find anything that the change would
break. Almost all uses of %x, %X, and %o were with nonnegative integers
where the behavior would not change. In the few places I found where the
integers could be negative, the resulting strings were things like
nonces where the change didn't break anything. Of course I could have
missed some uses, and there are uses outside of Emacs source code;
still, it seems that this change would break very little user code (and
the rare users who might run into a problem have a simple workaround).
%a has quite a different meaning in C11, so we'd need to use some other
letter (or set of letters, if we want something for %x, %X, %o) if we
went that route. This seems like overkill for such a small change to
functionality that hardly ever matters; plus, %x, %X and %o would
continue to have problematic machine-dependent semantics and would not
be sensibly extensible to bignums.
This bug report was last modified 2 years and 322 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.