On Mon, Feb 7, 2022 at 9:12 AM Victor Stinner <vstin...@python.org> wrote:

> Hi,
>
> I made a change to require C99 <math.h> "NAN" constant and I'm was
> asked to update the PEP 7 to clarify the C subset is needed to build
> Python 3.11.
>
> Python 3.6 requires a subset of the C99 standard to build defined by the
> PEP 7:
> https://www.python.org/dev/peps/pep-0007/
>
> I modified Python 3.11 to require more C99 features of the <math.h> header:
>
> * bpo-45440: copysign(), hypot(), isfinite(), isinf(), isnan(), round()
> * bpo-46640: NAN
>
> After my NAN change (bpo-46640), Petr Viktorin asked me to update the
> PEP 7. I proposed a change to simply say that "Python 3.11 and newer
> versions use C99":
> https://github.com/python/peps/pull/2309
>
> I would prefer to not have to give an exhaustive list of C99 features
> used by CPython, since it's unclear to me what belongs to C99 or to
> ISO C89. As I wrote before, Python already uses C99 features since
> Python 3.6.
>
> On my PEP PR, Guido van Rossum asked me to escalate the discussion to
> python-dev, so here I am :-)
>
> In "C99", the number "99" refers to the year 1999, the standard is now
> 23 years old:
> https://en.wikipedia.org/wiki/C99
>
> In 2022, C99 is now well supported by C compilers supported by Python:
> GCC, clang, MSVC.


I think if those compilers fully C99 at this point we should consider just
moving completely over to C99.

-Brett


>
> I don't know if AIX XLC supports C99. AIX provides a "c99" compiler
> compatible with C99. It also seems like GCC is usable on AIX.
>
> I don't know if ICC supports C99. Python doesn't officially the ICC
> compiler, the ICC buildbots are gone a few years ago. But sometimes I
> make some changes to enhance the ICC support, when the change is small
> enough.
>
> Note: Python also uses C11 <stdatomic.h>, but it's not required: there
> are fallbacks for compilers which don't support it.
>
> Victor
> --
> Night gathers, and now my watch begins. It shall not end until my death.
> _______________________________________________
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/J5FSP6J4EITPY5C2UJI7HSL2GQCTCUWN/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/ZLDOBJUVMTIRETVRNHPWWO5MBHTXYEW3/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to