Skip to content

Incorrect size assumption for size_t on 16-bit target (msp430). #168

@geurtv

Description

@geurtv

As noted in README.md:

The implementation currently assumes each of intmax_t, signed size_t, and ptrdiff_t has the same size as long int or as long long int. If this is not the case for your platform, please open an issue.

With msp430-elf-gcc for the 16-bit msp430 microcontroller sizeof(size_t) == 2, which is the same as int and not as long (sizeof(long) == 4). A change like this should be portable and fixes the issue (intmax_t and ptrdiff_t will need similar changes):

flags |= sizeof(size_t) <= sizeof(int) ? FLAGS_INT : sizeof(size_t) == sizeof(long) ? FLAGS_LONG : FLAGS_LONG_LONG;

Metadata

Metadata

Assignees

Labels

platform-incompatibilityThe library is making assumptions causing it to fail on platforms where they do not hold.resolved-on-developA changeset fixing this issue has been commiutted to the development branch

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions