]> git.ipfire.org Git - thirdparty/coreutils.git/commit
factor: port to platforms
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 25 Sep 2024 22:59:09 +0000 (15:59 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 28 Sep 2024 00:42:58 +0000 (17:42 -0700)
commit5867465510d023ece420e9921fc1034e3abd6455
tree97e29139118787329216a5c91eaff5620f48250d
parentac5213acbae8ab2e17589acc7c89b88b2d0e62ef
factor: port to platforms

* src/factor.c (mod2): Work even if cntd <= cnta.  The old version
of the code assumed that shifts by N had unspecified behavior
unless 0 <= N < wordsize.  Although this assumption is portable to
all known practical platforms, the C standard says these shifts
have undefined behavior and some pedantic platforms check this.
* tests/factor/create-test.sh:
* tests/local.mk (factor_tests): New test t37.
src/factor.c
tests/factor/create-test.sh
tests/local.mk