[LLVMbugs] [Bug 24080] Infinite loop with any optimization if control reaches end of non-void function

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jul 9 21:25:50 PDT 2015


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

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |richard-llvm at metafoo.co.uk
         Resolution|---                         |INVALID

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
This code has undefined behavior. C++ does not allow control to reach the end
of a non-void function. At -O0, we give you a guaranteed crash when this
happens; at -O1 and above, we optimize on the assumption that this undefined
behavior does not occur. In all modes, we give you a warning that your code is
(probably) broken.

-- 
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/20150710/49e40d8f/attachment.html>


More information about the llvm-bugs mailing list