-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Document that public headers target C11 and C++11 #129666
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
I have something to say: It would be better if this could be managed through some switch macros to toggle between different C versions, This would make the migration process less abrupt, at least giving developers some options to choose from. I believe it's not just about migrating to C11. As far as I know, many are still using C99, and even though this has no impact on the migration results, C99 already fully meets the needs of some CPython developers. Although static assertions are really great, their absence can be compensated for by using a scanner. |
What kind of switch do you propose? If you can, please discuss on Discourse; here your comment won't be seen by as many people. |
… to GCC/clang test_c[pp]ext tests (pythonGH-130686)" This reverts commit 003e6d2.
…clang test_c[pp]ext tests (pythonGH-130686)
…clang test_c[pp]ext tests (pythonGH-130686)
…st_c[pp]ext tests (GH-130692) Disable pedantic check for c++03 (unlimited API) Also add a check for c++03 *limited* API, which passes in pedantic mode after removing a comma in the `PySendResult` declaration, and allowing `long long`.
…clang test_c[pp]ext tests (pythonGH-130686)
…-pedantic-errors` to GCC/clang test_c[pp]ext tests (pythonGH-130686)" (pythonGH-130688) This reverts commit 003e6d2.
…ang test_c[pp]ext tests (pythonGH-130692) Disable pedantic check for c++03 (unlimited API) Also add a check for c++03 *limited* API, which passes in pedantic mode after removing a comma in the `PySendResult` declaration, and allowing `long long`.
Our public documentation should say that you need C11 or C++11 to
#include <Python.h>
.Internally, we need to be more lenient & careful (though we won’t promise upfront how much). It's not OK to just break C99 support or slightly out-of-spec compilers.
We should test as much as we can; the devguide should be updated with details.
API WG discussion/vote: capi-workgroup/decisions#30 (comment)
Discourse topic: https://discuss.python.org/t/python-3-14-headers-will-require-c11-and-c-11/79481
Linked PRs
-pedantic-errors
to GCC/clang test_c[pp]ext tests #130686-pedantic-errors
to GCC/clang test_c[pp]ext tests (GH-130686)" #130688Devguide PR
The text was updated successfully, but these errors were encountered: