[LLVMbugs] [Bug 16688] Inconsistent issue of the `ud2` instruction at the bottom of functions with no return statements

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jul 23 22:47:32 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16688

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 is all correct; falling of a value-returning function has undefined
behavior in C++ (and not in C). At -O0, the undefined behavior causes a trap;
at -O1 and above, we optimize on the basis of it being unreachable.

Your "-w" is suppressing both the warning telling you the code is broken and
the warning telling you that using "clang++" causes the ".c" input to be
treated as a C++ source file.

-- 
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/20130724/197f423d/attachment.html>


More information about the llvm-bugs mailing list