We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
!
The ! operator produces unexpected results.
fn main(){ let a: i32 = 5; let b = !a; // expected -6 gccrs gives 0. }
Godbolt: https://godbolt.org/z/cKPPz1bYc
The text was updated successfully, but these errors were encountered:
I'm not entirely sure, but it seems that the operator is interpreting the least significant bit of the number as a boolean value and complementing it.
Sorry, something went wrong.
No branches or pull requests
The
!
operator produces unexpected results.Godbolt: https://godbolt.org/z/cKPPz1bYc
The text was updated successfully, but these errors were encountered: