Issue 5755: "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++" (original) (raw)

Created on 2009-04-14 17:22 by zooko, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
no_strict_proto.patch jdemeyer,2016-09-08 11:45 Disable -Wstrict-prototypes
Pull Requests
URL Status Linked Edit
PR 6791 closed jdemeyer,2018-05-14 10:29
PR 7395 merged methane,2018-06-04 12:35
PR 7422 merged miss-islington,2018-06-05 11:42
PR 7438 merged methane,2018-06-06 00:18
PR 7476 closed jdemeyer,2018-06-07 10:13
Messages (16)
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) * (Python committer) 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) * (Python committer) 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) * (Python triager) 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) * (Python committer) 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) * (Python committer) 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) * (Python committer) 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) * (Python triager) 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) * (Python committer) 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) * (Python triager) 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) * (Python committer) 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) * (Python committer) 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
History
Date User Action Args
2022-04-11 14:56:47 admin set github: 50005
2018-06-07 10:13:19 jdemeyer set pull_requests: + <pull%5Frequest7099>
2018-06-06 05:26:45 methane set status: open -> closedresolution: fixedstage: patch review -> resolved
2018-06-06 05πŸ”ž19 methane set messages: +
2018-06-06 00πŸ”ž58 methane set pull_requests: + <pull%5Frequest7065>
2018-06-06 00:12:09 miss-islington set nosy: + miss-islingtonmessages: +
2018-06-05 11:42:12 miss-islington set pull_requests: + <pull%5Frequest7047>
2018-06-05 11:40:56 methane set messages: +
2018-06-04 13πŸ”ž27 jdemeyer set messages: +
2018-06-04 13:02:48 methane set messages: +
2018-06-04 12:48:46 jdemeyer set messages: +
2018-06-04 12:38:01 methane set messages: +
2018-06-04 12:35:33 methane set pull_requests: + <pull%5Frequest7021>
2018-06-04 11:53:31 serhiy.storchaka set messages: +
2018-06-04 11:17:50 methane set nosy: + methanemessages: +
2018-05-15 21:37:15 eitan.adler set messages: +
2018-05-15 21:30:41 eitan.adler set nosy: + eitan.adler
2018-05-15 06:27:06 jdemeyer set messages: +
2018-05-14 15πŸ”ž59 serhiy.storchaka set nosy: + serhiy.storchakamessages: +
2018-05-14 10:29:17 jdemeyer set stage: patch reviewpull_requests: + <pull%5Frequest6476>
2018-05-14 08:12:14 jdemeyer set nosy: + jdemeyer
2016-09-08 11:45:58 jdemeyer set files: + no_strict_proto.patchkeywords: + patch
2014-01-25 19:02:13 jon set nosy: - jon
2011-05-04 13:04:14 vokoda set nosy: + vokodamessages: +
2011-04-08 22:05:46 jon set nosy: + jon
2010-12-24 02:41:59 GooseYArd set nosy: + GooseYArd
2010-09-16 19:34:52 Jason.Grout set nosy: + Jason.Groutmessages: +
2009-05-04 14:14:39 tarek set messages: +
2009-04-14 17:22:50 zooko create