Should newlib-nano printf() support %llX?

Asked by Clem Taylor

I'm using the newlib-nano as part of gcc-arm-none-eabi-4_8-2014q3.

It looks like the library was compiled without 'long long' support:

uint64_t moo;
printf("moo=0x%llX\n", moo);

results in:
moo=0xlX

I'm not exactly sure what options newlib-nano was compiled with for the 2014q3 build.

Looking at the build-toolchain.sh it looks like --enable-newlib-io-long-long was specified,
so I would have thought the above should work.

Was it the intention of the devs to support %ll out of the box?

Question information

Language:
English Edit question
Status:
Answered
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Terry Guo (terry.guo) said :
#1

The newlib-nano only supports up to C89, please refer to https://sourceware.org/ml/newlib/2014/msg00166.html. And the format string "ll" is supported since C99.

Can you help with this problem?

Provide an answer of your own, or ask Clem Taylor for more information if necessary.

To post a message you must log in.