mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 22:10:21 +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);
|
||||
else
|
||||
{
|
||||
/* FIXME: I think this may be a bug on some arches -- results
|
||||
of % with negative second arg are undefined... */
|
||||
/* C99 specifies that "%" is the remainder corresponding to a
|
||||
quotient rounded towards zero, and that's also traditional
|
||||
for machine division, so z here should be well defined. */
|
||||
long z = xx % yy;
|
||||
long result;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue