Fix left shift operator undefined behavior in integer_ops#2627
Fix left shift operator undefined behavior in integer_ops#2627bashbaug merged 3 commits intoKhronosGroup:mainfrom
Conversation
On current |
Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
Nice, I was able to reproduce this also and verify that it no longer occurs with the fix in this PR. Not in this PR, but should we have an option to build with the undefined behavior sanitizer enabled? We have a similar option for the thread sanitizer: Lines 28 to 32 in 4a923c0 |
|
This has two approvals now and should be non-controversial. Merging. |
Sorry for the late followup, but yes, I think that's valuable. I've opened #2672 for this. |
As per the C++ Programming Reference page n0: 151, section: 7.6.7 Shift operators
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/n5001.pdf