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

Incorrect casting in BitFlags Clear. #30882

Open
bzbarsky-apple opened this issue Dec 7, 2023 · 2 comments
Open

Incorrect casting in BitFlags Clear. #30882

bzbarsky-apple opened this issue Dec 7, 2023 · 2 comments
Assignees

Comments

@bzbarsky-apple
Copy link
Contributor

Doing foo &= bar does not do the right thing if foo and bar are both of a type that will get promoted to int when doing &. Unfortunately, that's what the code is doing after the modifications in #30680

This will happen to compile on some compilers/versions but not others.

Originally posted by @bzbarsky-apple in #30680 (comment)

@andy31415
Copy link
Contributor

Do we happen to have a concrete compiler variant that exposes this? it would be nice to add this kind of test in CI when we fix it (and in case other places have similar issues that are compiler-dependent)

@bzbarsky-apple
Copy link
Contributor Author

I don't yet; I would have mentioned it otherwise. It's just a landmine waiting to explode on someone for now.

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

3 participants