Re: [PATCH] assume sprintf formatting of wide characters may fail (PR 86853)

2018-10-03 Thread Jeff Law
On 8/20/18 1:05 PM, David Edelsohn wrote: > builtin-sprintf-warn-1.c, builtin-sprintf-warn-2.c, and > builtin-sprintf-11.c now are failing on AIX. I expect that at least part > of the reason is 32 bit AIX uses 16 bit wchar_t > > #ifdef __64BIT__ > typedef unsigned intwchar_t; > #else > typede

Re: [PATCH] assume sprintf formatting of wide characters may fail (PR 86853)

2018-08-20 Thread Jeff Law
On 08/20/2018 01:05 PM, David Edelsohn wrote: > builtin-sprintf-warn-1.c, builtin-sprintf-warn-2.c, and > builtin-sprintf-11.c now are failing on AIX. I expect that at least part > of the reason is 32 bit AIX uses 16 bit wchar_t > > #ifdef __64BIT__ > typedef unsigned intwchar_t; > #else > ty

Re: [PATCH] assume sprintf formatting of wide characters may fail (PR 86853)

2018-08-20 Thread David Edelsohn
builtin-sprintf-warn-1.c, builtin-sprintf-warn-2.c, and builtin-sprintf-11.c now are failing on AIX. I expect that at least part of the reason is 32 bit AIX uses 16 bit wchar_t #ifdef __64BIT__ typedef unsigned intwchar_t; #else typedef unsigned short wchar_t; #endif /* __64BIT__ */ Are the

Re: [PATCH] assume sprintf formatting of wide characters may fail (PR 86853)

2018-08-16 Thread Jeff Law
On 08/04/2018 12:46 PM, Martin Sebor wrote: > The sprintf handling of wide characters neglects to consider > that calling the function may fail due to a conversion error > (when the wide character is invalid or not representable in > the current locale).  The handling also misinterprets > the POSIX

Re: [PATCH] assume sprintf formatting of wide characters may fail (PR 86853)

2018-08-16 Thread Jeff Law
On 08/09/2018 01:29 PM, Bernd Edlinger wrote: >>> + bool one_2_one_ascii >>> + = (target_to_host_charmap[0] == 1 && target_to_host ('a') == >>> 97); >> Hmm. Is this really sufficient?I have nowhere near enough knowledge >> of the potential target character sets to know if th

Re: [PATCH] assume sprintf formatting of wide characters may fail (PR 86853)

2018-08-09 Thread Martin Sebor
On 08/08/2018 10:14 PM, Jeff Law wrote: On 08/04/2018 12:46 PM, Martin Sebor wrote: The sprintf handling of wide characters neglects to consider that calling the function may fail due to a conversion error (when the wide character is invalid or not representable in the current locale). The hand

Re: [PATCH] assume sprintf formatting of wide characters may fail (PR 86853)

2018-08-09 Thread Bernd Edlinger
>> + bool one_2_one_ascii >> += (target_to_host_charmap[0] == 1 && target_to_host ('a') == >> 97); > Hmm. Is this really sufficient?I have nowhere near enough knowledge > of the potential target character sets to know if this is sufficiently > tight. Shouldn't it be targ

Re: [PATCH] assume sprintf formatting of wide characters may fail (PR 86853)

2018-08-08 Thread Jeff Law
On 08/04/2018 12:46 PM, Martin Sebor wrote: > The sprintf handling of wide characters neglects to consider > that calling the function may fail due to a conversion error > (when the wide character is invalid or not representable in > the current locale).  The handling also misinterprets > the POSIX

Re: [PATCH] assume sprintf formatting of wide characters may fail (PR 86853)

2018-08-05 Thread Eric Gallager
On 8/4/18, Martin Sebor wrote: > The sprintf handling of wide characters neglects to consider > that calling the function may fail due to a conversion error > (when the wide character is invalid or not representable in > the current locale). The handling also misinterprets > the POSIX %S wide str

[PATCH] assume sprintf formatting of wide characters may fail (PR 86853)

2018-08-04 Thread Martin Sebor
The sprintf handling of wide characters neglects to consider that calling the function may fail due to a conversion error (when the wide character is invalid or not representable in the current locale). The handling also misinterprets the POSIX %S wide string directive as a plain narrow %s and do