This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Build Python with -Wundef: don't use undefined macros
Type: Stage: patch review
Components: Build Versions: Python 3.11
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Mark.Shannon, vstinner
Priority: normal Keywords: patch

Created on 2022-02-06 23:52 by vstinner, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 31176 merged vstinner, 2022-02-07 00:01
PR 31177 merged vstinner, 2022-02-07 00:04
PR 31178 merged vstinner, 2022-02-07 00:06
PR 31179 closed vstinner, 2022-02-07 00:09
PR 31180 merged vstinner, 2022-02-07 00:33
PR 31192 merged vstinner, 2022-02-07 14:00
PR 31193 merged vstinner, 2022-02-07 14:02
PR 31194 merged vstinner, 2022-02-07 14:04
PR 31196 merged vstinner, 2022-02-07 14:14
Messages (10)
msg412690 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-02-06 23:52
Building Python with "gcc -Wundef" emits many warnings about usage of undefined macros. If a macro is not defined, it is equal to 0.

The problem is that a macro can be undefined because of a missing #include, or because of a typo in its name, or because "#ifdef MACRO" should be used instead of "#if MACRO". It can hide bugs.

I plan to fix these warnings.
msg412695 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-02-07 00:25
New changeset 16f96a4cf9ab1e91e6e8e18232378bc4b42bb796 by Victor Stinner in branch 'main':
bpo-46670: Remove unused get_frame_state() function (GH-31177)
https://github.com/python/cpython/commit/16f96a4cf9ab1e91e6e8e18232378bc4b42bb796
msg412696 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-02-07 00:27
New changeset 097f74a5a37e2a8a26d529cede456ede7011b66f by Victor Stinner in branch 'main':
bpo-46670: Define all macros for stringlib (GH-31176)
https://github.com/python/cpython/commit/097f74a5a37e2a8a26d529cede456ede7011b66f
msg412697 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-02-07 00:46
New changeset b556f53785cb9ad8cc088ad8c10efee91fe3da58 by Victor Stinner in branch 'main':
bpo-46670: Test if a macro is defined, not its value (GH-31178)
https://github.com/python/cpython/commit/b556f53785cb9ad8cc088ad8c10efee91fe3da58
msg412746 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-02-07 14:05
-Wexpansion-to-defined and -Wunused-macros options are also interesting.
msg412753 - (view) Author: Mark Shannon (Mark.Shannon) * (Python committer) Date: 2022-02-07 15:06
New changeset 4b603f628207b380a8a2f22d7ff5d2dbb0853e2e by Victor Stinner in branch 'main':
bpo-46670: Remove unused macros in ceval.c (GH-31196)
https://github.com/python/cpython/commit/4b603f628207b380a8a2f22d7ff5d2dbb0853e2e
msg412755 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-02-07 15:21
New changeset 4f1d3f33dd8b37a151b73533f18b08b0500223e5 by Victor Stinner in branch 'main':
 bpo-46670: Remove unused macros in the Modules directory (GH-31194)
https://github.com/python/cpython/commit/4f1d3f33dd8b37a151b73533f18b08b0500223e5
msg412756 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-02-07 15:21
New changeset 760349198dbd8771629753e096a885c1aa28a1ca by Victor Stinner in branch 'main':
bpo-46670: Remove unused macros in the Objects directory (GH-31193)
https://github.com/python/cpython/commit/760349198dbd8771629753e096a885c1aa28a1ca
msg412757 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-02-07 15:21
New changeset 7d8b69e1d1f125454d8cec81ff0dee72f2bef957 by Victor Stinner in branch 'main':
bpo-46670: Remove unused macros in the Python directory (GH-31192)
https://github.com/python/cpython/commit/7d8b69e1d1f125454d8cec81ff0dee72f2bef957
msg412758 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-02-07 15:22
New changeset f20ca766fe404a20daea29230f161a0eb71bb489 by Victor Stinner in branch 'main':
bpo-46670: Fix #ifdef in sha3module.c (GH-31180)
https://github.com/python/cpython/commit/f20ca766fe404a20daea29230f161a0eb71bb489
History
Date User Action Args
2022-04-11 14:59:55adminsetgithub: 90828
2022-02-07 15:22:33vstinnersetmessages: + msg412758
2022-02-07 15:21:56vstinnersetmessages: + msg412757
2022-02-07 15:21:47vstinnersetmessages: + msg412756
2022-02-07 15:21:35vstinnersetmessages: + msg412755
2022-02-07 15:06:41Mark.Shannonsetnosy: + Mark.Shannon
messages: + msg412753
2022-02-07 14:14:08vstinnersetpull_requests: + pull_request29366
2022-02-07 14:05:59vstinnersetmessages: + msg412746
2022-02-07 14:04:49vstinnersetpull_requests: + pull_request29364
2022-02-07 14:02:37vstinnersetpull_requests: + pull_request29363
2022-02-07 14:00:20vstinnersetpull_requests: + pull_request29362
2022-02-07 00:46:54vstinnersetmessages: + msg412697
2022-02-07 00:33:49vstinnersetpull_requests: + pull_request29351
2022-02-07 00:27:01vstinnersetmessages: + msg412696
2022-02-07 00:25:48vstinnersetmessages: + msg412695
2022-02-07 00:09:10vstinnersetpull_requests: + pull_request29350
2022-02-07 00:06:39vstinnersetpull_requests: + pull_request29349
2022-02-07 00:04:21vstinnersetpull_requests: + pull_request29348
2022-02-07 00:01:06vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request29347
2022-02-06 23:52:36vstinnercreate