-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect size assumption for size_t on 16-bit target (msp430). #168
Comments
So, you're saying |
Yes, that's exactly how it is, and I wouldn't expect this to be too uncommon for 16-bit microcontrollers. Btw, |
Ok, if you say so... I'll try to find the time to consider your suggestion and check the code for potential impact of this situation. However, as you may know, there's war now, and demonstrations against it, and I've already been arrested at one of those, and there are some personal issues, and my job etc., so it may take a bit of time. If I haven't done anything within... 3 weeks from now, please ping me. |
… than `long` (e.g. for the msp430-elf-gcc target)
Please check out the development branch and let me know if everything works for you. |
That does the trick, thanks! Note that ptrdiff_t needs similar treatment. |
Right... can you recheck? |
Yes, that now works for both |
…` being of smaller size than `long` (e.g. for the msp430-elf-gcc target)
As noted in README.md:
With msp430-elf-gcc for the 16-bit msp430 microcontroller
sizeof(size_t) == 2
, which is the same asint
and not aslong
(sizeof(long) == 4
). A change like this should be portable and fixes the issue (intmax_t
andptrdiff_t
will need similar changes):The text was updated successfully, but these errors were encountered: