Re: gdb 8.x - g++ 7.x compatibility

Roman Popov
2018-02-05T20:10:20Z

Do you mean that g++ guarantees uniqueness of mangled names for types? And
uses name compare for operator== ?

2018-02-05 12:08 GMT-08:00 Jonathan Wakely <jwakely.gcc@gmail.com>:

> On 5 February 2018 at 17:44, Roman Popov wrote:
> > Interestingly RTTI name also gives no guarantees:
> > http://en.cppreference.com/w/cpp/types/type_info/name
> >
> > << Returns an implementation defined null-terminated character string
> > containing the name of the type. No guarantees are given; in particular,
> > the returned string can be identical for several types and change between
> > invocations of the same program. >>
> >
> > It probably makes sense to look how g++ implements
> > std::type_info::operator== . Probably there are some hints that GDB
> > algorithm can utilize.
> > Operator std::type_info::operator== must return true for equivalent
> types.
>
> It's the mangled name.
>