1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-12 06:41:13 +02:00

(scm_modulo): Amend fixme comment about negative divisor

with "%", C99 says it's well-defined.
This commit is contained in:
Kevin Ryde 2004-12-10 00:00:27 +00:00
parent 602d32dd48
commit 66b1c775d2

View file

@ -878,8 +878,9 @@ scm_modulo (SCM x, SCM y)
scm_num_overflow (s_modulo); scm_num_overflow (s_modulo);
else else
{ {
/* FIXME: I think this may be a bug on some arches -- results /* C99 specifies that "%" is the remainder corresponding to a
of % with negative second arg are undefined... */ quotient rounded towards zero, and that's also traditional
for machine division, so z here should be well defined. */
long z = xx % yy; long z = xx % yy;
long result; long result;