-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
clang sanitizer complains when trying to output negative integers #1377
Comments
This is weird because unsigned integer overflow is not a UB in C++. Also I wasn't able to reproduce it on your example or reduced one (https://godbolt.org/z/oq-O3I). Could you provide more details on how to repro (perhaps there are some additional compiler flags that affect this)? |
@vitaut Thanks for looking into it. You have to pass the sanitize integer option as well, sorry for the sloppy report. Here is an example https://godbolt.org/z/8xva4e. |
@vitaut And yes unsigned integer overflow is not UB. |
Should be worked around in 58c6f8c. |
@vitaut Thanks! |
91f7619 (Fix Visual Studio 2019 pedantic warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?), 2019-10-14)
on macosx using xcode
when doing something like
I get
The text was updated successfully, but these errors were encountered: