Skip to content

fix build with -Wcast-function-type -Werror on gcc8 #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anarcat
Copy link

@anarcat anarcat commented Jan 19, 2019

New versions of gcc8 will fail to build from source on Python
declarations because of the hairy cast we're doing there, example:

pam_python.c:1355:19: error: cast between incompatible function types from 'PyObject * (*)(PyObject *, PyObject *, PyObject *)' {aka 'struct _object * (*)(struct _object *, struct _object *, struct _object *)'} to 'PyObject * (*)(PyObject *, PyObject *)' {aka 'struct _object * (*)(struct _object *, struct _object *)'} [-Werror=cast-function-type]

This fix comes form the upstream cpython implementation:

python/cpython@62be742#diff-c3cf251f16d5a03a9e7d4639f2d6f998

New versions of gcc8 will fail to build from source on Python
declarations because of the hairy cast we're doing there, example:

    pam_python.c:1355:19: error: cast between incompatible function types from 'PyObject * (*)(PyObject *, PyObject *, PyObject *)' {aka 'struct _object * (*)(struct _object *, struct _object *, struct _object *)'} to 'PyObject * (*)(PyObject *, PyObject *)' {aka 'struct _object * (*)(struct _object *, struct _object *)'} [-Werror=cast-function-type]

This fix comes form the upstream cpython implementation:

python/cpython@62be742#diff-c3cf251f16d5a03a9e7d4639f2d6f998
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant