[New-bugs-announce] [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

Siddhesh Poyarekar report at bugs.python.org
Tue Mar 6 06:18:13 EST 2018


New submission from Siddhesh Poyarekar <siddhesh.poyarekar at gmail.com>:

gcc 8 has added a new warning heuristic to detect invalid function casts and a stock python build seems to hit that warning quite often.  The most common is the cast of a METH_NOARGS function (that uses just one argument) to a PyCFunction.  The fix is pretty simple but needs to be applied widely.  I'm slowly knocking them off in my spare time; WIP here, which has a few other types of warnings mixed in that I'll sift out during submission and also create separate bug reports for:

https://github.com/siddhesh/cpython/tree/func-cast

I'll clean up and post PR(s) once I am done but I figured I should file this report first since it is a pretty big change in terms of number of files touched and wanted to be sure that I'm making changes the way the community prefers.

----------
components: Build
messages: 313317
nosy: siddhesh
priority: normal
severity: normal
status: open
title: Invalid function cast warnings with gcc 8 for METH_NOARGS
type: compile error

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33012>
_______________________________________


More information about the New-bugs-announce mailing list