Skip to content
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

Fixed enum bitpacking in basic_function. #5

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

yuppox
Copy link

@yuppox yuppox commented Nov 10, 2020

GCC uses unsigned for enum, unless the enum includes explicit negative assignments. MSVC appears to default to signed. Bitpacking here creates errors if the enum is signed because the maximum value for 3 bits is 3, not 7.

The easy solution is to add an extra bit for signed/unsigned.

I wonder also if bitpacking is necessary?

no added 3 commits November 9, 2020 22:59
GCC uses unsigned for enum, unless the enum includes explicit negative assignments. MSVC appears to default to signed. Bitpacking here creates errors if the enum is signed because the maximum value for 3 bits is 3, not 7.

The easy solution is to add an extra bit for signed/unsigned.

I wonder also if bitpacking is necessary?
Added missing typecasts when using &_dummy.
Fixed #if preprocessor that was missing #else and added Windows Sleep() function.

In tokenizer, we get:
247:50: error: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]

This can be suppressed as I have done, by converting the source to a char*.
Fixed linker options.
Changed gcc-10 to gcc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant