René's URL Explorer Experiment


Title: Python 3.12.2 headers contain non-C90-compliant code · Issue #116869 · python/cpython · GitHub

Open Graph Title: Python 3.12.2 headers contain non-C90-compliant code · Issue #116869 · python/cpython

X Title: Python 3.12.2 headers contain non-C90-compliant code · Issue #116869 · python/cpython

Description: Bug report Bug description: When compiling a program that links against the Python libraries (and uses their headerfiles) with the -Werror=declaration-after-statement compiler flag enabled, the following error occurs: /usr/include/python...

Open Graph Description: Bug report Bug description: When compiling a program that links against the Python libraries (and uses their headerfiles) with the -Werror=declaration-after-statement compiler flag enabled, the fol...

X Description: Bug report Bug description: When compiling a program that links against the Python libraries (and uses their headerfiles) with the -Werror=declaration-after-statement compiler flag enabled, the fol...

Opengraph URL: https://github.com/python/cpython/issues/116869

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Python 3.12.2 headers contain non-C90-compliant code","articleBody":"# Bug report\n\n### Bug description:\n\nWhen compiling a program that links against the Python libraries (and uses their headerfiles) with the `-Werror=declaration-after-statement` compiler flag enabled, the following error occurs:\n\n```\n/usr/include/python3.12/object.h:233:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]\n  233 |     PyVarObject *var_ob = _PyVarObject_CAST(ob);\n```\n\nThis is fairly similar to previous issue #92781.\n\nAlthough the C90 style may be archaic and perhaps not worth supporting at some point, maintaining support could be helpful for some downstream platforms (I encountered this in Debian bug [#1057442](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057442)).\n\n\u003cdetails>\n\u003csummary>Minimal test cases to show that the problem did not occur with Python 3.11.8 and that it does occur on Python 3.12.2 and to help verify any fixes.\u003c/summary>\n\n```c\n#include \"/usr/include/python3.11/Python.h\"\n#include \"/usr/include/python3.11/object.h\"\n\nint main() {}\n```\n\n```c\n#include \"/usr/include/python3.12/Python.h\"\n#include \"/usr/include/python3.12/object.h\"\n\nint main() {}\n```\n\nCompiled in either case using:\n\n```\n$ gcc bugreport.c -Werror=declaration-after-statement\n```\n\nor equivalently, using `llvm` v17:\n\n```\n$ clang-17 bugreport.c -Werror=declaration-after-statement\n```\n\u003c/details>\n\n### CPython versions tested on:\n\n3.12\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-116950\n* gh-116954\n* gh-116963\n* gh-116973\n* gh-116990\n* gh-116995\n* gh-117010\n* gh-117011\n* gh-117043\n* gh-117106\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/jayaddison","@type":"Person","name":"jayaddison"},"datePublished":"2024-03-15T15:37:16Z","url":"https://github.com/python/cpython/issues/116869"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f19ae104-e29f-99c7-6182-f6494d90d2c7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD2E4:A71F9:3299D9D:400FE48:6B020980
html-safe-nonce41e8f587d5084ea86ab91c4150d4d3512162c22d883061467dfa42b5d987024e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMkU0OkE3MUY5OjMyOTlEOUQ6NDAwRkU0ODo2QjAyMDk4MCIsInZpc2l0b3JfaWQiOiI3NDc0NTMwMjgxMzU0MDM3NjMyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacbdf2def312db05c136995581b6174c396360f5ea1f0e60e3697ed3064fafb42c
hovercard-subject-tagissue:2188888046
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/116869/issue_layout
twitter:imagehttps://opengraph.githubassets.com/85b61cb7811b264d4aa0b7dc227777632e90f315e630144db779546e3431a8d9/python/cpython/issues/116869
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/85b61cb7811b264d4aa0b7dc227777632e90f315e630144db779546e3431a8d9/python/cpython/issues/116869
og:image:altBug report Bug description: When compiling a program that links against the Python libraries (and uses their headerfiles) with the -Werror=declaration-after-statement compiler flag enabled, the fol...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejayaddison
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/116869#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F116869
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F116869
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/116869
Reloadhttps://github.com/python/cpython/issues/116869
Reloadhttps://github.com/python/cpython/issues/116869
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/116869
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/116869
Python 3.12.2 headers contain non-C90-compliant codehttps://github.com/python/cpython/issues/116869#top
topic-C-APIhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-C-API%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/jayaddison
jayaddisonhttps://github.com/jayaddison
on Mar 15, 2024https://github.com/python/cpython/issues/116869#issue-2188888046
#92781https://github.com/python/cpython/issues/92781
#1057442https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057442
gh-116869: Make C API compatible with ISO C90 #116950https://github.com/python/cpython/pull/116950
gh-116869: Add test_cext test: build a C extension #116954https://github.com/python/cpython/pull/116954
gh-116869: Fix redefinition of the _PyOptimizerObject type #116963https://github.com/python/cpython/pull/116963
gh-116869: Enable test_cext and test_cppext on Free Threading build #116973https://github.com/python/cpython/pull/116973
gh-116869: Build test_cext with -Werror=declaration-after-statement #116990https://github.com/python/cpython/pull/116990
gh-116869: Test the limited C API in test_cext #116995https://github.com/python/cpython/pull/116995
gh-116869: Fix test_cext on RHEL7 #117010https://github.com/python/cpython/pull/117010
[3.12] gh-116869: Make C API compatible with ISO C90 (GH-116950) #117011https://github.com/python/cpython/pull/117011
gh-116869: Fix test_cext for Free Threading #117043https://github.com/python/cpython/pull/117043
gh-116869: Enable -Werror in test_cext for Free Threading #117106https://github.com/python/cpython/pull/117106
Nexthttps://github.com/python/cpython/issues/116869?timeline_page=1
jayaddisonhttps://github.com/jayaddison
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
on Mar 15, 2024https://github.com/python/cpython/issues/116869#event-12133465862
hugovkhttps://github.com/hugovk
topic-C-APIhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-C-API%22
on Mar 15, 2024https://github.com/python/cpython/issues/116869#event-12133512942
https://github.com/hugovk
hugovkhttps://github.com/hugovk
on Mar 15, 2024https://github.com/python/cpython/issues/116869#issuecomment-1999935681
C11https://en.cppreference.com/w/c/11
Optional C11 featureshttps://en.wikipedia.org/wiki/C11_(C_standard_revision)#Optional_features
https://docs.python.org/3/using/configure.htmlhttps://docs.python.org/3/using/configure.html
vstinnerhttps://github.com/vstinner
on Mar 18, 2024https://github.com/python/cpython/issues/116869#event-12148120533
pythongh-116869: Make C API compatible with ISO C90https://github.com/vstinner/cpython/commit/4bb33e341ff2375944f684c46e116b507c9556a2
pythongh-116869https://github.com/python/cpython/issues/116869
4bb33e3https://github.com/vstinner/cpython/commit/4bb33e341ff2375944f684c46e116b507c9556a2
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Mar 18, 2024https://github.com/python/cpython/issues/116869#issuecomment-2003245824
gh-116950https://github.com/python/cpython/pull/116950
vstinnerhttps://github.com/vstinner
on Mar 18, 2024https://github.com/python/cpython/issues/116869#event-12148954413
pythongh-116869: Add test_cext test: build a C extensionhttps://github.com/vstinner/cpython/commit/56dc08796cc48eb38c7f0244c4dd9fd30af0e9a9
pythongh-116869https://github.com/python/cpython/issues/116869
56dc087https://github.com/vstinner/cpython/commit/56dc08796cc48eb38c7f0244c4dd9fd30af0e9a9
pythongh-116869: Add test_cext test: build a C extensionhttps://github.com/vstinner/cpython/commit/47f0474c20ac0d2d18613bd4a21f65ad1c5e37ee
pythongh-116869https://github.com/python/cpython/issues/116869
47f0474https://github.com/vstinner/cpython/commit/47f0474c20ac0d2d18613bd4a21f65ad1c5e37ee
pythongh-116869: Add test_cext test: build a C extensionhttps://github.com/vstinner/cpython/commit/e033f51235b33560f6c686aa8f16307ad2af4986
pythongh-116869https://github.com/python/cpython/issues/116869
e033f51https://github.com/vstinner/cpython/commit/e033f51235b33560f6c686aa8f16307ad2af4986
pythongh-116869: Add test_cext test: build a C extensionhttps://github.com/vstinner/cpython/commit/01cffed097bc52642a47a39700ce996dadd1370a
pythongh-116869https://github.com/python/cpython/issues/116869
01cffedhttps://github.com/vstinner/cpython/commit/01cffed097bc52642a47a39700ce996dadd1370a
pythongh-116869: Add test_cext test: build a C extensionhttps://github.com/vstinner/cpython/commit/867f9e51852b6c17765aafc5feb74acfeb9e544a
pythongh-116869https://github.com/python/cpython/issues/116869
867f9e5https://github.com/vstinner/cpython/commit/867f9e51852b6c17765aafc5feb74acfeb9e544a
pythongh-116869: Add test_cext test: build a C extensionhttps://github.com/vstinner/cpython/commit/446769c0bf43bf1c19369216bf89840575f6c452
pythongh-116869https://github.com/python/cpython/issues/116869
446769chttps://github.com/vstinner/cpython/commit/446769c0bf43bf1c19369216bf89840575f6c452
https://github.com/colesbury
colesburyhttps://github.com/colesbury
on Mar 18, 2024https://github.com/python/cpython/issues/116869#issuecomment-2003895603
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Mar 18, 2024https://github.com/python/cpython/issues/116869#issuecomment-2003914076
https://github.com/colesbury
colesburyhttps://github.com/colesbury
on Mar 18, 2024https://github.com/python/cpython/issues/116869#issuecomment-2003935581
#92781https://github.com/python/cpython/issues/92781
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Mar 18, 2024https://github.com/python/cpython/issues/116869#issuecomment-2003978262
gh-116954https://github.com/python/cpython/pull/116954
adorilsonhttps://github.com/adorilson
on Mar 25, 2024https://github.com/python/cpython/issues/116869#event-12236065050
pythongh-116869: Test the limited C API in test_cext (python#116995)https://github.com/adorilson/cpython/commit/9eea117a62f5dafee0bd7bb53fd50e19d733172b
pythongh-116869https://github.com/python/cpython/issues/116869
python#116995https://github.com/python/cpython/pull/116995
9eea117https://github.com/adorilson/cpython/commit/9eea117a62f5dafee0bd7bb53fd50e19d733172b
pythongh-116869: Fix test_cext on RHEL7 (python#117010)https://github.com/adorilson/cpython/commit/f16b924a2571243f023c5ae73218bc6f7d10a172
pythongh-116869https://github.com/python/cpython/issues/116869
python#117010https://github.com/python/cpython/pull/117010
f16b924https://github.com/adorilson/cpython/commit/f16b924a2571243f023c5ae73218bc6f7d10a172
pythongh-116869: Fix test_cext for Free Threading (python#117043)https://github.com/adorilson/cpython/commit/857b18bd4caa475fc8047ac4bea1128279fb0209
pythongh-116869https://github.com/python/cpython/issues/116869
python#117043https://github.com/python/cpython/pull/117043
857b18bhttps://github.com/adorilson/cpython/commit/857b18bd4caa475fc8047ac4bea1128279fb0209
pythongh-116869: Enable -Werror in test_cext for Free Threading (pyth…https://github.com/adorilson/cpython/commit/5a3dcb55a012aae616d7f1210454ffa86e031293
pythongh-116869https://github.com/python/cpython/issues/116869
pyth…https://github.com/python/cpython/pull/117106
5a3dcb5https://github.com/adorilson/cpython/commit/5a3dcb55a012aae616d7f1210454ffa86e031293
NGRsoftlabhttps://github.com/NGRsoftlab
on Apr 2, 2024https://github.com/python/cpython/issues/116869#event-12319262222
Squashed commit of the following:https://github.com/NGRsoftlab/cpython/commit/1b5fe4cad096e32efee3a0477ef6f277ec2a2b96
1b5fe4chttps://github.com/NGRsoftlab/cpython/commit/1b5fe4cad096e32efee3a0477ef6f277ec2a2b96
Squashed commit of the following:https://github.com/NGRsoftlab/cpython/commit/a016a5413a6d8bd02939a6fb9afef90dbbb2fb54
a016a54https://github.com/NGRsoftlab/cpython/commit/a016a5413a6d8bd02939a6fb9afef90dbbb2fb54
diegorussohttps://github.com/diegorusso
on Apr 17, 2024https://github.com/python/cpython/issues/116869#event-12505748204
pythongh-116869: Fix redefinition of the _PyOptimizerObject type (pyt…https://github.com/diegorusso/cpython/commit/74d417ea22f00b5fd45371324bf24bdf398a9925
pythongh-116869https://github.com/python/cpython/issues/116869
pyt…https://github.com/python/cpython/pull/116963
74d417ehttps://github.com/diegorusso/cpython/commit/74d417ea22f00b5fd45371324bf24bdf398a9925
pythongh-116869: Add test_cext test: build a C extension (python#116954)https://github.com/diegorusso/cpython/commit/c9450e1f5371bb331b986180f24c508ffb088018
pythongh-116869https://github.com/python/cpython/issues/116869
python#116954https://github.com/python/cpython/pull/116954
c9450e1https://github.com/diegorusso/cpython/commit/c9450e1f5371bb331b986180f24c508ffb088018
pythongh-116869: Make C API compatible with ISO C90 (python#116950)https://github.com/diegorusso/cpython/commit/9ff0aa35417f17a4db9b4b90e5d7715327ee92c1
pythongh-116869https://github.com/python/cpython/issues/116869
python#116950https://github.com/python/cpython/pull/116950
9ff0aa3https://github.com/diegorusso/cpython/commit/9ff0aa35417f17a4db9b4b90e5d7715327ee92c1
pythongh-116869: Enable test_cext and test_cppext on Free Threading b…https://github.com/diegorusso/cpython/commit/873b95e6f49c12cf572f166fc85188c8d1977167
pythongh-116869https://github.com/python/cpython/issues/116869
873b95ehttps://github.com/diegorusso/cpython/commit/873b95e6f49c12cf572f166fc85188c8d1977167
pythongh-116869: Build test_cext with -Werror=declaration-after-state…https://github.com/diegorusso/cpython/commit/12ac5340328ad483d8ba2773ab22a7e04a8695c4
pythongh-116869https://github.com/python/cpython/issues/116869
12ac534https://github.com/diegorusso/cpython/commit/12ac5340328ad483d8ba2773ab22a7e04a8695c4
pythongh-116869: Test the limited C API in test_cext (python#116995)https://github.com/diegorusso/cpython/commit/7041920b9d30388856180810258b52012e1a3216
pythongh-116869https://github.com/python/cpython/issues/116869
python#116995https://github.com/python/cpython/pull/116995
7041920https://github.com/diegorusso/cpython/commit/7041920b9d30388856180810258b52012e1a3216
pythongh-116869: Fix test_cext on RHEL7 (python#117010)https://github.com/diegorusso/cpython/commit/086bda4e625a74bb327b03abfa9ab6b4bb25c941
pythongh-116869https://github.com/python/cpython/issues/116869
python#117010https://github.com/python/cpython/pull/117010
086bda4https://github.com/diegorusso/cpython/commit/086bda4e625a74bb327b03abfa9ab6b4bb25c941
pythongh-116869: Fix test_cext for Free Threading (python#117043)https://github.com/diegorusso/cpython/commit/3cb16da7209cbfe6ca3995b7e82e536aae1e05a1
pythongh-116869https://github.com/python/cpython/issues/116869
python#117043https://github.com/python/cpython/pull/117043
3cb16dahttps://github.com/diegorusso/cpython/commit/3cb16da7209cbfe6ca3995b7e82e536aae1e05a1
pythongh-116869: Enable -Werror in test_cext for Free Threading (pyth…https://github.com/diegorusso/cpython/commit/740141082af7d205e80c7bc7193134feae885f5c
pythongh-116869https://github.com/python/cpython/issues/116869
pyth…https://github.com/python/cpython/pull/117106
7401410https://github.com/diegorusso/cpython/commit/740141082af7d205e80c7bc7193134feae885f5c
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/116869
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/116869
topic-C-APIhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-C-API%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.