[issue17547] checking whether gcc supports ParseTuple __format__... erroneously returns yes with gcc 4.8
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17547] checking whether gcc supports ParseTuple __format__... erroneously returns yes with gcc 4.8
Jesús Cea Avión added the comment: This is affecting 3.2.5. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17547] checking whether gcc supports ParseTuple __format__... erroneously returns yes with gcc 4.8
Benjamin Peterson added the comment: I've now scrapped that test completely for 3.4. 6eab274d3e34 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17547] checking whether gcc supports ParseTuple __format__... erroneously returns yes with gcc 4.8
Roundup Robot added the comment: New changeset 9d50af4c482f by Benjamin Peterson in branch '2.7': -Wformat is needed by gcc 4.8 (closes #17547) http://hg.python.org/cpython/rev/9d50af4c482f New changeset 94a7475d3a5f by Benjamin Peterson in branch '3.3': -Wformat is needed by gcc 4.8 (closes #17547) http://hg.python.org/cpython/rev/94a7475d3a5f New changeset f12e3ce66ae6 by Benjamin Peterson in branch 'default': merge 3.3 (#17547) http://hg.python.org/cpython/rev/f12e3ce66ae6 -- nosy: +python-dev resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17547] checking whether gcc supports ParseTuple __format__... erroneously returns yes with gcc 4.8
Benjamin Peterson added the comment: We really ought to just scrap that configure test. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17547] checking whether gcc supports ParseTuple __format__... erroneously returns yes with gcc 4.8
Changes by Georg Brandl ge...@python.org: -- versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17547] checking whether gcc supports ParseTuple __format__... erroneously returns yes with gcc 4.8
Alex Leach added the comment: I don't think I can tell you anything you don't know already, but ... On Tue, 23 Apr 2013 19:38:18 +0100, Dave Malcolm rep...@bugs.python.org wrote: BTW, is that GCC format checking code available anywhere? Is this what you mean? http://gcc.gnu.org/viewcvs/gcc/trunk/gcc/c-family/c-format.c?annotate=193304pathrev=193304 I got taken straight there from the link you sent, above... Am I right in thinking that it was an out-of-tree patch to GCC, from the pre-plugin days? No idea.. GCC plugins have been around for several years now, though and the patch was only introduced in November. If this patch was applied to any past GCC distributions, I'm sure someone else would have been overwhelmed with warnings and would have mentioned something before now. Either way, it looks like the patch is going to stay. In case you hadn't seen it already, the invoke.texi source file probably has the most descriptive changes:- http://gcc.gnu.org/viewcvs/gcc/trunk/gcc/doc/invoke.texi?r1=193304r2=193303pathrev=193304 KR, Alex -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17547] checking whether gcc supports ParseTuple __format__... erroneously returns yes with gcc 4.8
Dave Malcolm added the comment: On Wed, 2013-04-24 at 10:48 +, Alex Leach wrote: Alex Leach added the comment: I don't think I can tell you anything you don't know already, but ... On Tue, 23 Apr 2013 19:38:18 +0100, Dave Malcolm rep...@bugs.python.org wrote: BTW, is that GCC format checking code available anywhere? Is this what you mean? http://gcc.gnu.org/viewcvs/gcc/trunk/gcc/c-family/c-format.c?annotate=193304pathrev=193304 I got taken straight there from the link you sent, above... [snip] Am I right in thinking that it was an out-of-tree patch to GCC, from the pre-plugin days? Sorry that I was a bit vague. GCC's __attribute((format(i, j, k))__ takes 3 parameters. The first parameter is a string code naming the mini-language expressing valid format strings and their mapping to the types that follow in the varargs. I was asking about the string code PyArg_ParseTuple used in the CPython configure test: the link above is the implementation of GCC's builtin format string codes: and AFAIK the only ones it knows about there are the ones in static const format_kind_info format_types_orig[] = in the above file (lines 808-873 of gcc/c-family/c-format.c) which are codes for printf, fprintf, various internal gcc APIs, NSString, scanf, strftime, and strfmon. i.e. I believe that the PyArg_ParseTuple code is from some 3rd party patch to GCC that never made it into GCC mainline. Does this code still exist anywhere? [Not that this has any bearing on this bug and the proposed patch: I'm a big fan of compiler attributes, and wouldn't want to remove them from the API.] Hope the above makes sense -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17547] checking whether gcc supports ParseTuple __format__... erroneously returns yes with gcc 4.8
Dave Malcolm added the comment: On Sat, 2013-04-20 at 21:25 +, Ned Deily wrote: Ned Deily added the comment: Dave, any reason this shouldn't go into the imminent 2.7.5 and 3.3.2 releases? I was trying to think of one; the only reason I can think of is if there are any compilers out there that don't recognize -Wformat, or have different behaviors for this test. That said, if -Wformat breaks the compile, then the configure test should fail, and thus all should be well. So I can't think of any issue (famous last words...) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17547] checking whether gcc supports ParseTuple __format__... erroneously returns yes with gcc 4.8
Dave Malcolm added the comment: BTW, is that GCC format checking code available anywhere? Am I right in thinking that it was an out-of-tree patch to GCC, from the pre-plugin days? [My cpychecker code adds some similar checking, but it doesn't use this attribute] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17547] checking whether gcc supports ParseTuple __format__... erroneously returns yes with gcc 4.8
Alex Leach added the comment: The configure.ac patch works for me, on x86_64 Arch Linux. I just updated to GCC-4.8.0 and came across an overwhelming number of these warnings when compiling extension modules. Thanks for the simple fix David. Tested on hg branch 2.7; the testsuite completes without error. -- nosy: +Alex.Leach versions: -Python 2.6, Python 2.7, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17547] checking whether gcc supports ParseTuple __format__... erroneously returns yes with gcc 4.8
Ned Deily added the comment: Dave, any reason this shouldn't go into the imminent 2.7.5 and 3.3.2 releases? -- nosy: +ned.deily stage: patch review - commit review versions: +Python 2.7, Python 3.3, Python 3.4 -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17547] checking whether gcc supports ParseTuple __format__... erroneously returns yes with gcc 4.8
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +benjamin.peterson, georg.brandl, larry priority: normal - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17547] checking whether gcc supports ParseTuple __format__... erroneously returns yes with gcc 4.8
New submission from Dave Malcolm: It appears that gcc's -Wformat warning changed from being on by default in gcc 4.7 and earlier to being off by default in gcc 4.8, needing to be enabled with -Wformat (or -Wall), if I'm reading: http://gcc.gnu.org/viewcvs/gcc?view=revisionrevision=193304 correctly This breaks CPython's configure.ac test: Check whether GCC supports PyArg_ParseTuple format in that the warning the test is supposed to emit is guarded by -Wformat, hence with gcc 4.8 this test always emits: checking whether gcc supports ParseTuple __format__... yes despite the fact that gcc doesn't. This leads to the pyconfig.h defining HAVE_ATTRIBUTE_FORMAT_PARSETUPLE, and thus we get this error when trying later use the python build to build a C extension module where -Wformat (or -Wall) *is* supplied: In file included from /usr/include/python2.7/Python.h:126:0, from isys.c:20: /usr/include/python2.7/modsupport.h:28:1: error: 'PyArg_ParseTuple' is an unrecognized format function type [-Werror=format=] PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...) Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3); Am attaching a work-in-progress patch to supply the missing argument at configure time Note to self: am tracking this downstream as https://bugzilla.redhat.com/show_bug.cgi?id=927358 -- components: Build files: 00175-fix-configure-Wformat.patch keywords: patch messages: 185226 nosy: dmalcolm priority: normal severity: normal stage: patch review status: open title: checking whether gcc supports ParseTuple __format__... erroneously returns yes with gcc 4.8 type: compile error versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file29574/00175-fix-configure-Wformat.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com