[llvm-bugs] [Bug 36610] clang can miscompile code involving uninitialized value and xor-s

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 6 14:59:27 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=36610

Eli Friedman <efriedma at codeaurora.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |INVALID

--- Comment #9 from Eli Friedman <efriedma at codeaurora.org> ---
If you really want to understand the edge cases of what's allowed, the rules in
the C++ standard are a better reflection of how compilers actually reason about
uninitialized variables. See
https://stackoverflow.com/questions/23415661/has-c-standard-changed-with-respect-to-the-use-of-indeterminate-values-and-und
.

In any case, just because the compiler appears to do what you want for some
particular case doesn't make it defined; it just means you're getting lucky.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180306/7c387bb1/attachment.html>


More information about the llvm-bugs mailing list