[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-02-01 Thread Victor Stinner
On Sat, Jan 30, 2021 at 10:37 AM Antoine Pitrou wrote: > You can hide the access behind a function call. Slightly more costly, > but shouldn't be that expensive on modern machines. Oh sure, on the API side, it can be an "opaque" function call (on the ABI side) or static inline function,

[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-01-30 Thread Steve Dower
On 29Jan2021 1715, Victor Stinner wrote: It seems like declaring a TLS in libpython and using it from an extension module (another dynamic library) is causing issues depending on the linker. It "should" work on macOS, but it doesn't. I'm pretty sure this is not defined in any calling

[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-01-30 Thread Steve Dower
On 29Jan2021 2227, Random832 wrote: On Thu, Jan 28, 2021, at 22:57, Emily Bowman wrote: On Thu, Jan 28, 2021 at 1:31 PM MRAB wrote: I have Microsoft Visual Studio Community 2019 Version 16.8.4 (it's free) and it supports C11 and C17. While an upgrade for Community is free, for

[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-01-30 Thread Antoine Pitrou
On Fri, 29 Jan 2021 18:15:37 +0100 Victor Stinner wrote: > Hi Mark, > > I tried to use C11 _Thread_local (Thread Local Storage, TLS) only with > GCC and clang and I got issues on macOS: > https://github.com/python/cpython/pull/23976 > > My PR uses __thread if _Thread_local is not available. >

[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-01-29 Thread Random832
On Thu, Jan 28, 2021, at 22:57, Emily Bowman wrote: > > On Thu, Jan 28, 2021 at 1:31 PM MRAB wrote: > > I have Microsoft Visual Studio Community 2019 Version 16.8.4 (it's free) > > and it supports C11 and C17. > > While an upgrade for Community is free, for Pro/Enterprise without an >

[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-01-29 Thread Ivan Pozdeev via Python-Dev
On 29.01.2021 20:15, Victor Stinner wrote: Hi Mark, I tried to use C11 _Thread_local (Thread Local Storage, TLS) only with GCC and clang and I got issues on macOS: https://github.com/python/cpython/pull/23976 My PR uses __thread if _Thread_local is not available. I don't think that MSC

[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-01-29 Thread Victor Stinner
Hi Mark, I tried to use C11 _Thread_local (Thread Local Storage, TLS) only with GCC and clang and I got issues on macOS: https://github.com/python/cpython/pull/23976 My PR uses __thread if _Thread_local is not available. I don't think that MSC (Visual Studio) implements C11 _Thread_local, but

[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-01-29 Thread Eric Snow
On Thu, Jan 28, 2021 at 9:28 AM Mark Shannon wrote: > Is there a good reason not to start using C11 now? Would C17 be a better choice? It sounds like it exists to fix problems with C11 (and doesn't actually add any new features). -eric ___ Python-Dev

[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-01-29 Thread Charalampos Stratakis
- Original Message - > From: "Nathaniel Smith" > To: "Gregory P. Smith" > Cc: "Charalampos Stratakis" , "Python Dev" > > Sent: Friday, January 29, 2021 6:29:58 AM > Subject: Re: [Python-Dev] Re: Why aren't we allowing the

[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-01-28 Thread Nathaniel Smith
On Thu, Jan 28, 2021 at 9:03 PM Gregory P. Smith wrote: > > On Thu, Jan 28, 2021 at 10:52 AM Charalampos Stratakis > wrote: >> >> >> >> - Original Message - >> > From: "Mark Shannon" >> > To: "Python Dev" >> > Sent: Thursday, January 28, 2021 5:26:37 PM >> > Subject: [Python-Dev] Why

[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-01-28 Thread Gregory P. Smith
On Thu, Jan 28, 2021 at 10:52 AM Charalampos Stratakis wrote: > > > - Original Message - > > From: "Mark Shannon" > > To: "Python Dev" > > Sent: Thursday, January 28, 2021 5:26:37 PM > > Subject: [Python-Dev] Why aren't we allowing the use of C11? > > > > Hi everyone, > > > > PEP 7

[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-01-28 Thread Emily Bowman
On Thu, Jan 28, 2021 at 1:31 PM MRAB wrote: > I have Microsoft Visual Studio Community 2019 Version 16.8.4 (it's free) > and it supports C11 and C17. While an upgrade for Community is free, for Pro/Enterprise without an annual license it's not. They've gone 100% subscription now, but people

[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-01-28 Thread MRAB
On 2021-01-28 19:20, Terry Reedy wrote: 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

[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-01-28 Thread Terry Reedy
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.

[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-01-28 Thread Charalampos Stratakis
- Original Message - > From: "Mark Shannon" > To: "Python Dev" > Sent: Thursday, January 28, 2021 5:26:37 PM > Subject: [Python-Dev] Why aren't we allowing the use of C11? > > Hi everyone, > > PEP 7 says that C code should conform to C89 with a subset of C99 allowed. > It's 2021 and

[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-01-28 Thread Antoine Pitrou
On Thu, 28 Jan 2021 16:26:37 + Mark Shannon wrote: > Hi everyone, > > PEP 7 says that C code should conform to C89 with a subset of C99 allowed. > It's 2021 and all the major compilers support C11 (ignoring the optional > parts). I think that CPython is supposed to compile on

[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-01-28 Thread Brett Cannon
On Thu, Jan 28, 2021 at 8:31 AM Mark Shannon wrote: > Hi everyone, > > PEP 7 says that C code should conform to C89 with a subset of C99 allowed. > It's 2021 and all the major compilers support C11 (ignoring the optional > parts). > > C11 has support for thread locals, static asserts, and