https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84531
--- Comment #4 from Bernd Edlinger <bernd.edlinger at hotmail dot de> --- Also these look like more like invalid casts than bogus warnings: ../Python-3.6.1/Objects/frameobject.c:586:5: Warnung: cast between incompatible function types from »void (*)(PyFrameObject *)« {alias »void (*)(struct _fra me *)«} to »int (*)(PyObject *)« {alias »int (*)(struct _object *)«} [-Wcast-function-type] (inquiry)frame_tp_clear, /* tp_clear */ ^ ../Python-3.6.1/Objects/funcobject.c:408:18: Warnung: cast between incompatible function types from »PyObject * (*)(PyFunctionObject *)« {alias »struct _obj ect * (*)(struct <anonym> *)«} to »PyObject * (*)(PyObject *, void *)« {alias »struct _object * (*)(struct _object *, void *)«} [-Wcast-function-type] {"__code__", (getter)func_get_code, (setter)func_set_code}, ^ ../Python-3.6.1/Objects/funcobject.c:408:41: Warnung: cast between incompatible function types from »int (*)(PyFunctionObject *, PyObject *)« {alias »int (* )(struct <anonym> *, struct _object *)«} to »int (*)(PyObject *, PyObject *, void *)« {alias »int (*)(struct _object *, struct _object *, void *)«} [-Wcast- function-type] {"__code__", (getter)func_get_code, (setter)func_set_code}, ^ And unfortunately the last two would be suppressed by the proposed patch.