bpo-33012: Fix invalid function cast warnings with gcc 8 in Argument Clinic. (GH-6748)

Fix invalid function cast warnings with gcc 8
for method conventions different from METH_NOARGS, METH_O and
METH_VARARGS in Argument Clinic generated code.
diff --git a/Objects/clinic/tupleobject.c.h b/Objects/clinic/tupleobject.c.h
index bef9005..67d9f34 100644
--- a/Objects/clinic/tupleobject.c.h
+++ b/Objects/clinic/tupleobject.c.h
@@ -11,7 +11,7 @@
 "Raises ValueError if the value is not present.");
 
 #define TUPLE_INDEX_METHODDEF    \
-    {"index", (PyCFunction)tuple_index, METH_FASTCALL, tuple_index__doc__},
+    {"index", (PyCFunction)(void(*)(void))tuple_index, METH_FASTCALL, tuple_index__doc__},
 
 static PyObject *
 tuple_index_impl(PyTupleObject *self, PyObject *value, Py_ssize_t start,
@@ -95,4 +95,4 @@
 {
     return tuple___getnewargs___impl(self);
 }
-/*[clinic end generated code: output=0fbf4321fb4365ac input=a9049054013a1b77]*/
+/*[clinic end generated code: output=0a6ebd2d16b09c5d input=a9049054013a1b77]*/