https://bugs.llvm.org/show_bug.cgi?id=39914
Hal Finkel <hfin...@anl.gov> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #1 from Hal Finkel <hfin...@anl.gov> ---
While I understand why you think that should be true, given how the operation
might work at the hardware level, the C/C++ specifications don't define the
behavior of shifts greater-than or equal-to the number of bits in the type.
Clang's behavior here is not a bug. The optimizer optimizes code assuming that
code that exhibits undefined behavior is not actually executed (and, thus, it
doesn't really matter what it does). You might find it useful to compile your
code with -fsanitize=undefined to enable the undefined-behavior sanitizer.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs