Skip to content

newlib-nano: Printf formatting does not work properly for some numeric types #1891

@miri64

Description

@miri64

Possibly other boards are effected, too. Compare the following program

#include <stdio.h>
#include <inttypes.h>

int main(void)
{
    uint64_t test = 0xabcdef0123456789;

    printf("%llx\n", test);
    printf("%lx\n", test);
    printf("%" PRIx64 "\n", test);

    return 0;
}

on iot-lab_M3

2014-10-28 13:15:00,163 - INFO # kernel_init(): This is RIOT! (Version: 2014.05-1144-gd91ec-beutlin-od)
2014-10-28 13:15:00,165 - INFO # kernel_init(): jumping into first task...
2014-10-28 13:15:00,166 - INFO # lx
2014-10-28 13:15:00,166 - INFO # a
2014-10-28 13:15:00,166 - INFO # lx

on native

kernel_init(): This is RIOT! (Version: 2014.05-1145-ga2223-beutlin-od)
kernel_init(): jumping into first task...
abcdef0123456789
23456789
abcdef0123456789

and on msba2

2014-10-28 13:15:00,163 - INFO # kernel_init(): This is RIOT! (Version: 2014.05-1144-gd91ec-beutlin-od)
2014-10-28 13:15:00,165 - INFO # kernel_init(): jumping into first task...
2014-10-28 13:15:00,166 - INFO # abcdef0123456789
2014-10-28 13:15:00,166 - INFO # 23456789
2014-10-28 13:15:00,166 - INFO # abcdef0123456789

Metadata

Metadata

Labels

Platform: ARMPlatform: This PR/issue effects ARM-based platformsState: don't staleState: Tell state-bot to ignore this issueType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions