On 2020-01-10 16:27:31 +0100, Marco Bodrato wrote:
> This code was changed.
> 
> https://gmplib.org/repo/gmp/rev/d6b57abdad8e
> 
> Can you please try with the development version?

I get the following error:

FAIL: t-printf
==============

gmp_vsnprintf return value wrong
  fmt       |%Mu|
  bufsize   2
  got       |12!7|
  want      |1|
  want full |127|
  ret       -1
  want_len  3
FAIL t-printf.exe (exit status: 3)

Note: The issue can be detected with the absence of \0 just before
the sentinel (but a \0 should be written there before the call to
make sure...).

But I now think that this is a bug that should be fixed in MinGW
since the intended behavior now seems to conform to the C standard.
FYI, the __USE_MINGW_ANSI_STDIO macro is now internal and should
no longer be used:

  
https://fr.osdn.net/projects/mingw/lists/archive/users/2019-January/000199.html

Is there a way to tell GMP's configure that vsnprintf is missing,
so that HAVE_VSNPRINTF is not defined?

BTW, I still notice in printf/vasprintf.c:

      ret = vsnprintf (d->buf + d->size, space, fmt, ap);
      if (ret == -1)
        {
          ASSERT (strlen (d->buf + d->size) == space-1);
          ret = space-1;
        }

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
_______________________________________________
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs

Reply via email to