This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: many warnings with f28 and gcc 8.1.1
Type: Stage: resolved
Components: Versions: Python 3.8
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Invalid function cast warnings with gcc 8 for METH_NOARGS
View: 33012
Assigned To: Nosy List: matrixise
Priority: normal Keywords:

Created on 2018-10-15 13:23 by matrixise, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (1)
msg327752 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2018-10-15 13:23
I use Fedora 28 and gcc (GCC) 8.1.1 20180712 (Red Hat 8.1.1-5)

and I get a lot of warnings, with the standard config of Python (./configure)

Objects/call.c: In function '_PyMethodDef_RawFastCallDict':
Objects/call.c:515:24: warning: cast between incompatible function types from 'PyCFunction' {aka 'struct _object * (*)(struct _object *, struct _object *)'} to 'PyObject * (*)(PyObject *, PyObject *, PyObject *)' {aka 'struct _object * (*)(struct _object *, struct _object *, struct _object *)'} [-Wcast-function-type]
             result = (*(PyCFunctionWithKeywords)meth) (self, argstuple, kwargs);
                        ^
Objects/call.c:530:20: warning: cast between incompatible function types from 'PyCFunction' {aka 'struct _object * (*)(struct _object *, struct _object *)'} to 'PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t)' {aka 'struct _object * (*)(struct _object *, struct _object * const*, long int)'} [-Wcast-function-type]
         result = (*(_PyCFunctionFast)meth) (self, args, nargs);
                    ^
Objects/call.c:538:49: warning: cast between incompatible function types from 'PyCFunction' {aka 'struct _object * (*)(struct _object *, struct _object *)'} to 'PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t,  PyObject *)' {aka 'struct _object * (*)(struct _object *, struct _object * const*, long int,  struct _object *)'} [-Wcast-function-type]
         _PyCFunctionFastWithKeywords fastmeth = (_PyCFunctionFastWithKeywords)meth;

....

+- 827 warnings
History
Date User Action Args
2022-04-11 14:59:07adminsetgithub: 79173
2018-10-15 13:29:22vstinnersetstatus: open -> closed
superseder: Invalid function cast warnings with gcc 8 for METH_NOARGS
resolution: duplicate
stage: resolved
2018-10-15 13:23:54matrixisecreate