[PATCH] vfprintf: Add test case for user-defined types and format specifiers
Florian Weimer
fweimer@redhat.com
Thu Jun 29 11:34:00 GMT 2017
On 06/29/2017 12:51 PM, H.J. Lu wrote:
> On Thu, Jun 29, 2017 at 12:31 AM, Florian Weimer <fweimer@redhat.com> wrote:
>> On 06/19/2017 03:48 PM, Florian Weimer wrote:
>>> 2017-06-19 Florian Weimer <fweimer@redhat.com>
>>>
>>> * stdio-common/tst-vfprintf-user-type.c: New file.
>>> * stdio-common/Makefile (tests): Add tst-vfprintf-user-type.
>>
>> I am going to commit this soon.
>>
>
> It fails on i686:
>
> tst-vfprintf-user-type.c: In function \u2018my_printf_function\u2019:
> tst-vfprintf-user-type.c:58:55: error: format \u2018%c\u2019 expects
> argument of type \u2018int\u2019, but argument 7 has type
> \u2018wchar_t {aka const long int}\u2019 [-Werror=format=]
> tst-vfprintf-user-type.c: In function \u2018my_arginfo_function\u2019:
> tst-vfprintf-user-type.c:112:55: error: format \u2018%c\u2019 expects
> argument of type \u2018int\u2019, but argument 7 has type
> \u2018wchar_t {aka const long int}\u2019 [-Werror=format=]
Please try the attached patch.
The need for the wint_t cast looks like a GCC bug.
Thanks,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tst-vfprintf.patch
Type: text/x-patch
Size: 2188 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170629/0de26721/attachment.bin>
More information about the Libc-alpha
mailing list