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:
parent
602d32dd48
commit
66b1c775d2
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue