[Bug c++/69375] GCC allows PMF type "void (T::*)()" to be caught as "void (T::*)() const"
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 13 23:05:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69375
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
My front-end debugging skills are pitiful, but I've found something suspicious.
ptm_initializer uses TYPE_PTRMEM_POINTED_TO_TYPE to get that pointee type. For
this case that expands to TYPE_PTRMEMFUNC_FN_TYPE which is a call to
cp_build_qualified_type with the qualifiers from cp_type_quals.
But cp_type_quals tries pretty hard to ensure we never get cv-quals for a
function type. For the purposes of RTTI, where we really do care about the
difference between void() and void()const, do we want the memfn quals instead?
More information about the Gcc-bugs
mailing list