Ciao,
Il 2020-01-10 14:12 Vincent Lefevre ha scritto:
On 2020-01-10 08:44:13 +0100, Niels Möller wrote:
Vincent Lefevre <vinc...@vinc17.net> writes:
> FAIL: t-printf
> ==============
> The failing code is
>
> ret = vsnprintf (d->buf, avail, fmt, ap);
> if (ret == -1)
> {
> ASSERT (strlen (d->buf) == avail-1);
> ret = avail-1;
> }
This code was changed.
https://gmplib.org/repo/gmp/rev/d6b57abdad8e
Can you please try with the development version?
> I don't understand the ASSERT. A return value of -1 means an output
> error, so that you cannnot deduce anything about the contents stored
> in d->buf.
Non-standard versions of snprintf returned -1 for truncation
(including
old glibc, and likely windows libc too). And the way I read the
ASSERT,
The change above was explained in the following message to the list:
https://gmplib.org/list-archives/gmp-devel/2018-January/004694.html
Ĝis,
m
_______________________________________________
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs