mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-21 12:10:26 +02:00
deprecate +nan.1
* libguile/numbers.c (mem2ureal): Deprecate nan values that are not "+nan.0".
This commit is contained in:
parent
df08fc359c
commit
5f237d6e0e
1 changed files with 10 additions and 1 deletions
|
@ -5716,7 +5716,16 @@ mem2ureal (SCM mem, unsigned int *p_idx,
|
||||||
/* Cobble up the fractional part. We might want to set the
|
/* Cobble up the fractional part. We might want to set the
|
||||||
NaN's mantissa from it. */
|
NaN's mantissa from it. */
|
||||||
idx += 4;
|
idx += 4;
|
||||||
mem2uinteger (mem, &idx, 10, &implicit_x);
|
if (mem2uinteger (mem, &idx, 10, &implicit_x) != 0)
|
||||||
|
{
|
||||||
|
#if SCM_ENABLE_DEPRECATED == 1
|
||||||
|
scm_c_issue_deprecation_warning
|
||||||
|
("Non-zero suffixes to `+nan.' are deprecated. Use `+nan.0'.");
|
||||||
|
#else
|
||||||
|
return SCM_BOOL_F;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
*p_idx = idx;
|
*p_idx = idx;
|
||||||
return scm_nan ();
|
return scm_nan ();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue