New submission from Maarten <mad...@gmail.com>: When using the `has_function` method of a CCompiler object, the compiler will emit a warning because the main function has no return type specified.
https://github.com/python/cpython/blob/8c9e9b0cd5b24dfbf1424d1f253d02de80e8f5ef/Lib/distutils/ccompiler.py#L784-L786 This warning is emitted: /tmp/clockq2_azlzj.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 2 | main (int argc, char **argv) { | ^~~~ This happens under Linux, gcc 9 ---------- components: Distutils files: 0001-Fix-compiler-warning-of-distutils-CCompiler.test_fun.patch keywords: patch messages: 350645 nosy: dstufft, eric.araujo, maarten priority: normal severity: normal status: open title: CCompiler has_function displays warning type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48563/0001-Fix-compiler-warning-of-distutils-CCompiler.test_fun.patch _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37965> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com