Web lists-archives.com

Re: [Mingw-users] snprintf buggy in gcc 4.9.3-1




-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/08/16 23:45, Peter Smulders wrote:
> Using the conversion %02d or %2d should produce a string of (at 
> least) 2 characters.

Correct.  However, this is nothing whatsoever to do with gcc-4.9.3,
(nor indeed specific to *any* GCC version).

> However when the number to be printed has only one digit snprintf 
> produces a field width of 1

What you report here, is https://sourceforge.net/p/mingw/bugs/2309/
This is specific to mingwrt-3.22, and is already fixed in 3.22.1

> A workaround is to use _snprintf.

Hardly!  That itself is utterly broken (by MS design), and mostly
useless.  The solution is to keep your MinGW installation up to date;
use the latest version of mingwrt, i.e. mingwrt-3.22.1

- -- 
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJXoI0EAAoJEMCtNsY0flo/1gMP/0GLjLmUEfMSZfFOZL+fJySi
aMe+vXJ/E8GritY/UlUFWu3dsBRQI/wJ7bGJ9nI0N/V3Z3OFHwOIl9XoSia2wV9K
8iZjHvtiJZ45/PBF7zH/D3xahdmTyTq4X4bQHAqVJZokmJCLXSPtcgyNa8oXqrmv
Uz4z+YIRnHQMN6TBSM6VktYDPlUqeU2Lw24JotPa6K5VpiaMcBngt8IFWKs9yV/Y
FEyjQsjGcEXeDdY2zoytknxkuF8t26ajoDxb6S9GGzSWQVEcj4vAy8np8QXJq/BN
PwzdvG2mcYRE7mrBi2VAR46GyCN3bgJJp0j4+rp8orgv5/aAfZ2kauDMfKSXV6Bp
SHVxBA11j1sJbd2zmsOIr/aNjP3W+xP4JkFY0GuSZ+4hmh8I6NyJgOObE2TV2nJ/
vsmvCYCumSZfSgkaSL3HIaCu8pCfdSwivWvpWg+N8xf7xHkpIclZJniKzSBlV1YY
gi1Xdt18IUN/fDt9l+lTRW3OA7BKwJH/KHbWb+DnEA5PRBL+yiV+jhBUYRHmoBpi
6mvYC0GNQL6NeaYknNCDfmNbG5IcNcktzcZ7uDW21Cg9qgCspoHD/x4FBjE3XrUU
vQsGDmo/V+0+cXKbVl3mGHj+P0GPoekHZ7J5e44ZKs9r3UVAxzJ6QwnGiirMu2hR
gX4W+pD4oH1QhHWGh21c
=COB9
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe