[LLVMbugs] [Bug 14242] typeid() on dereferenced null pointer does not throw std::bad_typeid

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Nov 2 07:53:34 PDT 2012


Ulf Magnusson <ulfalizer at gmail.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #3 from Ulf Magnusson <ulfalizer at gmail.com> 2012-11-02 09:53:34 CDT ---
Reading C++03, a second time, it seems this only applies when the
lvalue is a polymorphic class type (which makes sense), and

#include <typeinfo>

struct C { virtual ~C(); };

int main() { typeid(*(C*)0); }

does work as expected. (It throws std::bad_typeid.)

Close this as invalid then :).

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list