This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/10891] code using dynamic_cast causes segfaults when -fno-rtti is used
- From: "apl at alum dot mit dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Jul 2006 19:08:45 -0000
- Subject: [Bug c++/10891] code using dynamic_cast causes segfaults when -fno-rtti is used
- References: <bug-10891-6057@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from apl at alum dot mit dot edu 2006-07-05 19:08 -------
Created an attachment (id=11835)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11835&action=view)
protection against dynamic_cast<> with -fno-rtti is too eager
Here's a test that NEVER instantiates the template, but if compiled with
g++ -fno-rtti
will (un)happily complain.
Ideally, unless I call the templated function derived<T>::upcast() from a
compilation unit that has -fno-rtti specified, I really don't think I should
get an error
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10891