On 1/28/2021 11:26 AM, Mark Shannon wrote:

PEP 7 says that C code should conform to C89 with a subset of C99 allowed.

As I remember, when the Python C dialect was discussed about 4 years ago, no one seriously proposed moving beyond a subset of C99 addition, because of the state of MSVC.

It's 2021 and all the major compilers support C11 (ignoring the optional parts).

C11 has support for thread locals, static asserts, and anonymous structs and unions. All useful features.

Is there a good reason not to start using C11 now?

Inertia is *a* reason. C11 would require (and allow!) most (nearly all?) people compiling CPython on Windows to upgrade their VS-VC setup. Maybe including some buildbot machines.

Judging from the post for
https://bugs.python.org/issue42380
this requires VS 16.8 with MSVC 14.28, released last November. Prior distributions of VS 2019 had earlier versions. Last I knew, regular people without a dev license cannot get just MSVC. So we cannot require a compiler most people cannot get. This post otherwise gives additional reasons why upgrading would be good.

https://bugs.python.org/issue39952 discusses issues compiling with VS 2019 last spring (compiler not specified. The main blocker was tcl/tk. 3.9 uses 8.6.9; 3.10 is using 8.6.10 and I hope this is upgraded to 3.6.11 before release.

The devguide needs updating, as it says to get VS 2017, while https://visualstudio.microsoft.com/ only distributes VS 2019. It appears that C11 would require VS 2019 16.8 or later.

https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Internal_version_numbering has a table of MSVC versions, _MSC_VERs, and VS 20xx releases. Each of 'VS 2017' and 'VS 2019' are not just one thing but comprise multiple releases/versions, just like 'Windows 10'.

--
Terry Jan Reedy
_______________________________________________
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/PAWQQIGS2HJQ5F7GD5BF2YPOI5EAPKTG/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to