major formatted output function bug with %c and the value 0

Vincent Lefevre vincent at
Fri Dec 15 13:26:00 CET 2023


On 2023-12-13 20:03:13 +0100, marco.bodrato at wrote:
> It was changed in 2001, probably a workaround, because the comment was
> "Don't use sprintf return	value (it's a pointer on SunOS 4)"

Note that there are similar issues in printf/repl-vsnprintf.c, and I
think that this is the cause of the MPFR failure with MS Visual C++
(vsnprintf is used by gmp_vasprintf).

This file was added on 26 Oct 2001, thus 2 months after 0889877bb94a.

Vincent Lefèvre <vincent at> - Web: <>
100% accessible validated (X)HTML - Blog: <>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

More information about the gmp-bugs mailing list