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: Remove declarations for non-__STDC__ compilers
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: arhadthedev, vstinner
Priority: normal Keywords: patch

Created on 2022-02-21 10:48 by arhadthedev, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 31466 merged arhadthedev, 2022-02-21 10:49
Messages (3)
msg413645 - (view) Author: Oleg Iarygin (arhadthedev) * Date: 2022-02-21 10:48
Currently, Python code contains two places where presence of __STDC__ is checked:

- Include/internal/pycore_pymath.h:12
- Python/errors.c:13

These checks are used to add extern functions missing in non-standard versions of math.h.

However, after Python switched to C99, there is a guarantee that every compiler conforms to ISO C so checks of __STDC__ have no sense anymore.

Note, that:

- errors.c check was added by 53e8d44 on 9 Mar 1995
- pycore_pymath.h check was initially added into Objects/floatobject.c by eddc144 on 20 Nov 2003 then moved to pycore_pymath by 53876d9.
msg414046 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-02-25 23:17
New changeset 4060111f9dc44682f9d7bdafb4e7dacb96706ad3 by Oleg Iarygin in branch 'main':
bpo-46816: Remove declarations for non-__STDC__ compilers (GH-31466)
https://github.com/python/cpython/commit/4060111f9dc44682f9d7bdafb4e7dacb96706ad3
msg414047 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-02-25 23:17
It should be fine :-D Thanks.
History
Date User Action Args
2022-04-11 14:59:56adminsetgithub: 90972
2022-02-25 23:17:32vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg414047

stage: patch review -> resolved
2022-02-25 23:17:10vstinnersetmessages: + msg414046
2022-02-25 20:31:50terry.reedysetnosy: + vstinner
2022-02-21 10:49:06arhadthedevsetkeywords: + patch
stage: patch review
pull_requests: + pull_request29596
2022-02-21 10:48:39arhadthedevcreate