This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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: nano printf + powerpc gcc


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

Attachment: signature.asc
Description: PGP signature


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