https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164

--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Thomas de Bock from comment #18)
> (In reply to Jason Merrill from comment #17)
> > As I commented at
> > 
> > https://inbox.sourceware.org/gcc-patches/75ff8af8-af03-42fa-b68b-
> > e6c16a34c...@redhat.com/
> > 
> > we could optimize the dynamic_cast to type_info::operator== instead of
> > vtable comparison.
> 
> I agree having dynamic_cast be optimized to type_info::operator== when it
> can (and when optimizations are enabled) would be good. Like I said though I
> also think having an optimal optimization that just checks vtables ptrs is
> important to have available behind some compiler flags as well.

With <typeinfo> being included, that option would already exist,
-D__GXX_MERGED_TYPEINFO_NAMES=1

Reply via email to