nano printf + powerpc gcc

Corinna Vinschen vinschen@redhat.com
Mon Jan 8 10:07:00 GMT 2018


On Dec 25 16:39, Alexander Fedotov wrote:
> Hi
> 
> I'm experienced a strange printf() for float variables behaviour with
> Nano version while regular is fine. It just prins out a garbage (even
> with enabled -u _printf_float). After some digging I've managed to
> track down issue until this line:
> 
> n = _printf_float (data, &prt_data, fp, pfunc, &ap);
> 
> 
> Moreover there are number of warnings also in build log:
> 
> src_newlib/newlib/libc/stdio/nano-vfprintf.c -o lib_a-nano-svfprintf.o
> ../../../../../../src_newlib/newlib/libc/stdio/nano-vfprintf.c: In
> function '_svfprintf_r':
> ../../../../../../src_newlib/newlib/libc/stdio/nano-vfprintf.c:645:55:
> warning: passing argument 5 of '_printf_float' from incompatible
> pointer type
>         n = _printf_float (data, &prt_data, fp, pfunc, &ap);
>                                                                        ^
> In file included from
> ../../../../../../src_newlib/newlib/libc/stdio/nano-vfprintf.c:169:0:
> ../../../../../../src_newlib/newlib/libc/stdio/nano-vfprintf_local.h:228:1:
> note: expected 'struct __va_list_tag (*)[1]' but argument is of type
> 'struct __va_list_tag **'
>  _printf_float (struct _reent *data,
>  ^
> ../../../../../../src_newlib/newlib/libc/stdio/nano-vfprintf.c:650:45:
> warning: passing argument 5 of '_printf_i' from incompatible pointer
> type
>   n = _printf_i (data, &prt_data, fp, pfunc, &ap);
>                                                             ^
> In file included from
> ../../../../../../src_newlib/newlib/libc/stdio/nano-vfprintf.c:169:0:
> ../../../../../../src_newlib/newlib/libc/stdio/nano-vfprintf_local.h:221:1:
> note: expected 'struct __va_list_tag (*)[1]' but argument is of type
> 'struct __va_list_tag **'
>  _printf_i (struct _reent *data, struct _prt_data_t *pdata, FILE *fp,
> 
> 
> It looks like nano written without taking in mind such targets. Here I
> found workaround https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14557
> that's working.
> 
> I'm attaching a patch.
> 
> Alex

Pushed.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20180108/f25f57f6/attachment.sig>


More information about the Newlib mailing list