[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS
STINNER Victor
report at bugs.python.org
Tue Mar 5 09:58:30 EST 2019
STINNER Victor <vstinner at redhat.com> added the comment:
I marked bpo-36197 as a duplicate of this issue:
"""
gcc -pthread -c -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -g -Og -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Objects/memoryobject.o Objects/memoryobject.c
Objects/memoryobject.c:3112:21: warning: cast between incompatible function types from 'PyObject * (*)(PyMemoryViewObject *, PyObject *, PyObject *)' {aka 'struct _object * (*)(struct <anonymous> *, struct _object *, struct _object *)'} to 'PyObject * (*)(PyObject *, PyObject *)' {aka 'struct _object * (*)(struct _object *, struct _object *)'} [-Wcast-function-type]
{"tobytes", (PyCFunction)memory_tobytes, METH_VARARGS|METH_KEYWORDS, memory_tobytes_doc},
I am preparing a small PR for this issue.
"""
=> PR 12179
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33012>
_______________________________________
More information about the Python-bugs-list
mailing list