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

Fix UB in shifts & add missing Bits instances #89

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

konsumlamm
Copy link
Contributor

In C, shifting by a negative number or a number greater than or equal to the number of bits is UB. shiftL and shiftR now guard against this. Also uncomment the Bits instances for Int8, Int16, Int32 and Int64 and add FiniteBits instances.

@augustss augustss merged commit 7d146bd into augustss:master Jan 12, 2025
13 checks passed
@augustss
Copy link
Owner

Tack!

@konsumlamm konsumlamm deleted the shift branch January 12, 2025 18:09
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.

2 participants