New submission from Siddhesh Poyarekar <>:

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:

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 

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 <>
Python-bugs-list mailing list

Reply via email to