https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115664
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Oh I take that back here is the testcase which shows the warning:
```
struct Object
{
template<class T>
void method(void (*callback)(T*));
virtual void g();
};
template<class T>
void Object::method(void (*)(T*))
{
if (dynamic_cast<T*>(this) == nullptr)
throw 1;
}
void c(Object*);
void f(Object *a)
{
a->method(c);
}
```
I didn't read the original description correctly.