[LLVMbugs] [Bug 17346] New: dynamic_cast to void* regressed by r187564

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 24 12:22:38 PDT 2013


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

            Bug ID: 17346
           Summary: dynamic_cast to void* regressed by r187564
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: reuben.morais at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

r187564 regressed |dynamic_cast<void*>(foo);| when using |-fno-rtti|. The
standard says:

dynamic_cast<T>(v);

5.2.7p6:
Otherwise, v shall be a pointer to or an lvalue of a polymorphic type (10.3).

5.2.7p7:
If T is ā€œpointer to cv void,ā€ then the result is a pointer to the most derived
object pointed to by v. Otherwise, a run-time check is applied to see if the
object pointed or referred to by v can be converted to the type pointed or
referred to by T.


It sounds like Clang should not be erroring out in this case. This breaks
building Mozilla products.

-- 
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/20130924/191e5efe/attachment.html>


More information about the llvm-bugs mailing list