https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84531
--- Comment #3 from Bernd Edlinger <bernd.edlinger at hotmail dot de> --- Actually the warning on PyCFunctionWithoutArgs is _not_ a false positive: I am looking at Python-3.6.1 right now. What I see is that functions with no arguments have the signature "PyObject * (*)(PyObject *)" but on the call side the Call passes two arguments see Python-3.6.1/Objects/methodobject.c: case METH_NOARGS: size = PyTuple_GET_SIZE(args); if (size != 0) { PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%zd given)", f->m_ml->ml_name, size); return NULL; } res = (*meth)(self, NULL);