-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
"-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++" #50005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
A user of the Tahoe-LAFS project submitted a bug report to us, saying: """ A little googling shows that this gets reported frequently to other http://trac.sagemath.org/sage_trac/ticket/425 Those other projects seem to think that this is distutils's problem, but |
I could work on a patch for this, by checking the compiler, if I get |
Any progress on this? I see this warning a *lot* when compiling lots of packages for Sage (matplotlib included). |
distutils reuses whatever flags Python was built with, covered here: http://bugs.python.org/issue1222585 (and here http://bugs.python.org/issue9031). |
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. |
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. |
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. 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. |
Can we backport this to 3.7 and 3.6? I think it's safe and helpful. |
I am not sure now about removing -Wstrict-prototypes. I haven't found confirmation that this option is included in -Wall or -Wextra. |
-Wstrict-prototypes is not included in -Wall and -Wextra. |
And 2.7 for the same reasons. |
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) |
I meant backporting this patch as-is to 2.7 without adding -Wstrict-prototypes to CFLAGS_NODIST |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: