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

Casting bool to pointer type results in invalid Rust #1077

Open
jorendorff opened this issue Apr 8, 2024 · 0 comments
Open

Casting bool to pointer type results in invalid Rust #1077

jorendorff opened this issue Apr 8, 2024 · 0 comments

Comments

@jorendorff
Copy link

The fix should be the same as #1030, but presumably with something like size_t as the intermediate type.

(Why, you might ask, would anyone ever do this in real code. The answer is that C doesn't have generics, so projects will have, say, a single hash table type with void * values, and store booleans in it by casting.)

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

No branches or pull requests

1 participant