[New-bugs-announce] [issue46816] Remove declarations for non-__STDC__ compilers

Oleg Iarygin report at bugs.python.org
Mon Feb 21 05:48:39 EST 2022


New submission from Oleg Iarygin <oleg at arhadthedev.net>:

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.

----------
components: Interpreter Core
messages: 413645
nosy: arhadthedev
priority: normal
severity: normal
status: open
title: Remove declarations for non-__STDC__ compilers
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46816>
_______________________________________


More information about the New-bugs-announce mailing list