-
Notifications
You must be signed in to change notification settings - Fork 5k
Remove 4146 from libunwind #66427
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
Remove 4146 from libunwind #66427
Conversation
This converts the invalid arithmetic negation on an unsigned value to use the identity of bitwise negation plus one.
Tagging subscribers to this area: @dotnet/runtime-infrastructure Issue DetailsContributes to #66154 This converts the invalid arithmetic negation on an unsigned value to use the identity of bitwise negation plus one. Upstream PR: libunwind/libunwind#333 /cc @GrabYourPitchforks @jkotas @janvorli @am11
|
Just out of curiosity, do you prefer |
@GrabYourPitchforks That is a fair point. I try to avoid casting when possible as it feels like an escape hatch for doing something I shouldn't be doing. If you think the latter would be preferable, I am fine changing it to that. |
Nit: This may be less efficient than the original code (depends on whether the compiler knows how to optimize back to -a). I believe that the most common pattern for these situations is runtime/src/coreclr/inc/clrtypes.h Line 322 in d94ca57
It really depends on what the libunwind maintainer prefers... |
@jkotas @GrabYourPitchforks One of the maintainers of libunwind responded and indicated they don't have a strong preference. This would seem to imply we can do what we think is best. See the reply and options at libunwind/libunwind#333 (comment). |
when the operation's target should reflect a signed value.
* Remove 4146 from libunwind Use existing libunwind align macro and use casting when the operation's target should reflect a signed value.
Contributes to #66154
This converts the invalid arithmetic negation on an unsigned value to use the identity of bitwise negation plus one.Upstream PR: libunwind/libunwind#333
/cc @GrabYourPitchforks @jkotas @janvorli @am11