https://bugs.llvm.org/show_bug.cgi?id=41875
Sanjay Patel <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
CC| |[email protected]
Status|NEW |RESOLVED
--- Comment #1 from Sanjay Patel <[email protected]> ---
The function invokes undefined behavior, so anything is possible.
You can test for that by adding a 'main' wrapper and:
$ clang -fsanitize=undefined 41875.c
$ ./a.out
41875.c:9:14: runtime error: shift exponent 32 is too large for 32-bit type
'uint32_t' (aka 'unsigned int')
For safe code and likely better code optimization, you may want to use the
clang builtins for bitwise rotation:
https://clang.llvm.org/docs/LanguageExtensions.html#builtin-functions
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs