summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d/next/Build
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh.poyarekar@gmail.com>2018-04-29 18:59:33 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2018-04-29 18:59:33 (GMT)
commit55edd0c185ad2d895b5d73e47d67049bc156b654 (patch)
treed609dfc924b59b89816a610ba86cd3e6c34a641c /Misc/NEWS.d/next/Build
parent9f3535c9cde8813ce631d6ebe4d790682f594828 (diff)
downloadcpython-55edd0c185ad2d895b5d73e47d67049bc156b654.zip
cpython-55edd0c185ad2d895b5d73e47d67049bc156b654.tar.gz
cpython-55edd0c185ad2d895b5d73e47d67049bc156b654.tar.bz2
bpo-33012: Fix invalid function cast warnings with gcc 8 for METH_NOARGS. (GH-6030)
METH_NOARGS functions need only a single argument but they are cast into a PyCFunction, which takes two arguments. This triggers an invalid function cast warning in gcc8 due to the argument mismatch. Fix this by adding a dummy unused argument.
Diffstat (limited to 'Misc/NEWS.d/next/Build')
-rw-r--r--Misc/NEWS.d/next/Build/2018-03-08-20-25-29.bpo-33012.k9Fe1q.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Build/2018-03-08-20-25-29.bpo-33012.k9Fe1q.rst b/Misc/NEWS.d/next/Build/2018-03-08-20-25-29.bpo-33012.k9Fe1q.rst
new file mode 100644
index 0000000..4740533
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2018-03-08-20-25-29.bpo-33012.k9Fe1q.rst
@@ -0,0 +1,5 @@
+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. Fix this by adding a dummy argument to all functions that
+implement METH_NOARGS.