msg85972 - (view) |
Author: Zooko O'Whielacronx (zooko) |
Date: 2009-04-14 17:22 |
A user of the Tahoe-LAFS project submitted a bug report to us, saying: """ I get lots of "cc1plus: warning: command line option "-Wstrict- prototypes" is valid for Ada/C/ObjC but not for C++" when compiling """ A little googling shows that this gets reported frequently to other Python projects that have C++ code: http://trac.sagemath.org/sage_trac/ticket/425 http://www.mail-archive.com/matplotlib- users@lists.sourceforge.net/.html Those other projects seem to think that this is distutils's problem, but I don't see evidence that any of them opened a ticket for distutils yet. |
|
|
msg87130 - (view) |
Author: Tarek ZiadΓ© (tarek) *  |
Date: 2009-05-04 14:14 |
I could work on a patch for this, by checking the compiler, if I get some feedback from the matplotlib guys in this issue here |
|
|
msg116598 - (view) |
Author: Jason Grout (Jason.Grout) |
Date: 2010-09-16 19:34 |
Any progress on this? I see this warning a *lot* when compiling lots of packages for Sage (matplotlib included). |
|
|
msg135128 - (view) |
Author: Peter Le Bek (vokoda) |
Date: 2011-05-04 13:04 |
distutils reuses whatever flags Python was built with, covered here: http://bugs.python.org/issue1222585 (and here http://bugs.python.org/issue9031). |
|
|
msg316519 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2018-05-14 15:18 |
Maybe include it in PY_CFLAGS_NODIST instead of PY_CFLAGS? Or just remove it, since in any case we now use -Wall and -Wextra with GCC. |
|
|
msg316626 - (view) |
Author: Jeroen Demeyer (jdemeyer) *  |
Date: 2018-05-15 06:27 |
> Or just remove it I updated the PR to do that. I didn't want to propose that initially because that patch was proposed here almost 2 years ago but not accepted. |
|
|
msg316733 - (view) |
Author: Eitan Adler (eitan.adler) * |
Date: 2018-05-15 21:37 |
copying and adapting my comments on the PR: Strict Prototypes is correct and helpful for C. That said, the way it is currently implemented, by checking for the compiler in CC is sub-optimal at best. CC ought to always be a C compiler, and never a C++ compiler. It also seems questionable that distutils is using the python cflags rather than a dedicated set. The best fix is a separate and specific list of flags for distutils rather than modifying the set of flags used to build python. That said, the current implementing of flags for python isn't great, so lets remove it as a short term fix. |
|
|
msg318644 - (view) |
Author: Inada Naoki (methane) *  |
Date: 2018-06-04 11:17 |
Can we backport this to 3.7 and 3.6? I think it's safe and helpful. |
|
|
msg318645 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2018-06-04 11:53 |
I am not sure now about removing -Wstrict-prototypes. I haven't found confirmation that this option is included in -Wall or -Wextra. |
|
|
msg318647 - (view) |
Author: Inada Naoki (methane) *  |
Date: 2018-06-04 12:38 |
-Wstrict-prototypes is not included in -Wall and -Wextra. I created PR-7395 which moves the option to CFLAGS_NODIST, as Serhiy suggested before. |
|
|
msg318648 - (view) |
Author: Jeroen Demeyer (jdemeyer) *  |
Date: 2018-06-04 12:48 |
> Can we backport this to 3.7 and 3.6? I think it's safe and helpful. And 2.7 for the same reasons. |
|
|
msg318650 - (view) |
Author: Inada Naoki (methane) *  |
Date: 2018-06-04 13:02 |
2.7 doesn't have CFLAGS_NODIST and I don't have motivation to manually backport it to 2.7. (I'm not expert of autotools) |
|
|
msg318651 - (view) |
Author: Jeroen Demeyer (jdemeyer) *  |
Date: 2018-06-04 13:18 |
> 2.7 doesn't have CFLAGS_NODIST I meant backporting this patch as-is to 2.7 without adding -Wstrict-prototypes to CFLAGS_NODIST |
|
|
msg318737 - (view) |
Author: Inada Naoki (methane) *  |
Date: 2018-06-05 11:40 |
New changeset e33648484775fa533fc8f1e5cc45f60061d29d54 by INADA Naoki in branch 'master': bpo-5755: Move -Wstrict-prototypes to CFLAGS_NODIST (GH-7395) https://github.com/python/cpython/commit/e33648484775fa533fc8f1e5cc45f60061d29d54 |
|
|
msg318792 - (view) |
Author: miss-islington (miss-islington) |
Date: 2018-06-06 00:12 |
New changeset d6e789c402330905b1bd9103538d1027fcfb08a4 by Miss Islington (bot) in branch '3.7': bpo-5755: Move -Wstrict-prototypes to CFLAGS_NODIST (GH-7395) https://github.com/python/cpython/commit/d6e789c402330905b1bd9103538d1027fcfb08a4 |
|
|
msg318800 - (view) |
Author: Inada Naoki (methane) *  |
Date: 2018-06-06 05:18 |
New changeset d59f97c8325ba509c9b08d488091f45ca642f0b6 by INADA Naoki in branch '3.6': bpo-5755: Move -Wstrict-prototypes to CFLAGS_NODIST (GH-7395) https://github.com/python/cpython/commit/d59f97c8325ba509c9b08d488091f45ca642f0b6 |
|
|