[Bug c++/96356] New: RTTI for non-polymorphic typeid

c.de-claverie at pm dot me gcc-bugzilla@gcc.gnu.org
Tue Jul 28 13:45:54 GMT 2020


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

            Bug ID: 96356
           Summary: RTTI for non-polymorphic typeid
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: c.de-claverie at pm dot me
  Target Milestone: ---

Hello,

I would like to bring the following possible issue to your attention to make
sure the behaviour is expected :
https://stackoverflow.com/questions/63132693

To sum up the problem, a "cannot use 'typeid' with '-fno-rtti'" error is thrown
when using the typeid operator on type-erased non-polymorphic types. It is
unclear to me whether this is the an expected behabiour or not, because the
typeid operator is resolved at compile time (according to cppreference) and, as
a result, should not be reliant on rtti.

This is my first contribution here. Please feel free to let me know if I can
add any useful information.


More information about the Gcc-bugs mailing list