This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] vfprintf: Add test case for user-defined types and format specifiers


On Thu, Jun 29, 2017 at 4:34 AM, Florian Weimer <fweimer@redhat.com> wrote:
> 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.
>

Works for me.

Thanks.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]