diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-08-28 10:36:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-28 10:36:18 -0700 |
commit | 0229b56d8c0cb65b8ad789e69dcd281fd92a6d96 (patch) | |
tree | 0f37ddd7069ca1909d83f567d36b05b7fe526201 | |
parent | c3642219090f2564c1790330cbf0ba31f19dcaf4 (diff) | |
download | cpython-git-0229b56d8c0cb65b8ad789e69dcd281fd92a6d96.tar.gz |
closes bpo-37965: Fix compiler warning of distutils CCompiler.test_function. (GH-15560)
https://bugs.python.org/issue37965
https://bugs.python.org/issue37965
Automerge-Triggered-By: @benjaminp
(cherry picked from commit 55aabee07501e1468082b3237620e4ecd75c5da6)
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
-rw-r--r-- | Lib/distutils/ccompiler.py | 3 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2019-08-28-14-04-18.bpo-37965.7xGE-C.rst | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py index 88a910c681..3a7b5b84e1 100644 --- a/Lib/distutils/ccompiler.py +++ b/Lib/distutils/ccompiler.py @@ -748,8 +748,9 @@ class CCompiler: for incl in includes: f.write("""#include "%s"\n""" % incl) f.write("""\ -main (int argc, char **argv) { +int main (int argc, char **argv) { %s(); + return 0; } """ % funcname) finally: diff --git a/Misc/NEWS.d/next/Library/2019-08-28-14-04-18.bpo-37965.7xGE-C.rst b/Misc/NEWS.d/next/Library/2019-08-28-14-04-18.bpo-37965.7xGE-C.rst new file mode 100644 index 0000000000..116a9e49dc --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-08-28-14-04-18.bpo-37965.7xGE-C.rst @@ -0,0 +1 @@ +Fix C compiler warning caused by distutils.ccompiler.CCompiler.has_function. |