Skip to content

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