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]

"cannot convert to a pointer type" compilation error


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


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