"cannot convert to a pointer type" compilation error

Thomas Preudhomme thomas.preudhomme@foss.arm.com
Mon Jan 29 11:57:00 GMT 2018


Hi,

This is known and being discussed in the thread starting at [1].

[1] https://sourceware.org/ml/newlib/2018/msg00030.html

Best regards,

Thomas

On 29/01/18 10:06, R. Diez via newlib wrote:
> Hallo all:
> 
> I am trying to upgrade my toolchain for an embedded ARM Cortex-M4F processor to 
> newlib 3.0.0 with GCC 7.3, and I am getting the following compilation errors:
> 
> 
> /home/rdiez/GsShared/Toolchains/ToolchainSet-2018-01-29-5/Toolchain-cortex-m4f-build/newlib-3.0.0/newlib/libc/stdio/nano-vfscanf.c: 
> In function '__ssvfscanf_r':
> /home/rdiez/GsShared/Toolchains/ToolchainSet-2018-01-29-5/Toolchain-cortex-m4f-build/newlib-3.0.0/newlib/libc/stdio/nano-vfscanf.c:430:2: 
> error: cannot convert to a pointer type
>    ret = _scanf_chars (rptr, &scan_data, fp, va_ptr(ap));
>    ^~~
> 
> /home/rdiez/GsShared/Toolchains/ToolchainSet-2018-01-29-5/Toolchain-cortex-m4f-build/newlib-3.0.0/newlib/libc/stdio/nano-vfscanf.c:432:2: 
> error: cannot convert to a pointer type
>    ret = _scanf_i (rptr, &scan_data, fp, va_ptr(ap));
>    ^~~
> 
> /home/rdiez/GsShared/Toolchains/ToolchainSet-2018-01-29-5/Toolchain-cortex-m4f-build/newlib-3.0.0/newlib/libc/stdio/nano-vfprintf.c: 
> In function '_svfprintf_r':
> /home/rdiez/GsShared/Toolchains/ToolchainSet-2018-01-29-5/Toolchain-cortex-m4f-build/newlib-3.0.0/newlib/libc/stdio/nano-vfprintf.c:644:2: 
> error: cannot convert to a pointer type
>    n = _printf_i (data, &prt_data, fp, pfunc, va_ptr(ap));
>    ^
> make[7]: *** [Makefile:1935: lib_a-nano-svfscanf.o] Error 1
> make[7]: *** Waiting for unfinished jobs....
> 
> /home/rdiez/GsShared/Toolchains/ToolchainSet-2018-01-29-5/Toolchain-cortex-m4f-build/newlib-3.0.0/newlib/libc/stdio/nano-vfprintf.c: 
> In function '_vfprintf_r':
> /home/rdiez/GsShared/Toolchains/ToolchainSet-2018-01-29-5/Toolchain-cortex-m4f-build/newlib-3.0.0/newlib/libc/stdio/nano-vfprintf.c:644:2: 
> error: cannot convert to a pointer type
>    n = _printf_i (data, &prt_data, fp, pfunc, va_ptr(ap));
>    ^
> 
> 
> I suspect it has to do with va_ptr().
> 
> With Newlib 2.5.0.20170922 and GCC 6.4.0 I had no problems.
> 
> Can anybody help?
> 
> Best regards,
>    Ruben



More information about the Newlib mailing list