Does any C library implement C11 threads for GNU/Linux?

前端 未结 7 1250
抹茶落季
抹茶落季 2020-11-29 02:59

There have been a lot of questions about C11 and C11 threading, but I don\'t see a definitive answer anywhere:

Does any C

相关标签:
7条回答
  • 2020-11-29 03:30

    Hmmm, it looks like GCC 4.9.0 actually provides substantial support for C11 standards (at least since the web docs were modified on around the end of June, 2014.

    From https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Standards.html

    A fourth version of the C standard, known as C11, was published in 2011 as ISO/IEC 9899:2011. GCC has substantially complete support for this standard, enabled with -std=c11 or -std=iso9899:2011. (While in development, drafts of this standard version were referred to as C1X.)

    And from https://gcc.gnu.org/gcc-4.9/changes.html

    ISO C11 atomics (the _Atomic type specifier and qualifier and the header) are now supported. ISO C11 generic selections (_Generic keyword) are now supported. ISO C11 thread-local storage (_Thread_local, similar to GNU C __thread) is now supported. ISO C11 support is now at a similar level of completeness to ISO C99 support: substantially complete modulo bugs, extended identifiers (supported except for corner cases when -fextended-identifiers is used), floating-point issues (mainly but not entirely relating to optional C99 features from Annexes F and G) and the optional Annexes K (Bounds-checking interfaces) and L (Analyzability). A new C extension __auto_type provides a subset of the functionality of C++11 auto in GNU C.

    From that, it is hard to tell what all of that will really mean when the pedal hits the metal. An upgrade on an environment to the latest GCC 4.9.0 release and a few simple driver programs would confirm how much or how little it is being implemented.

    Hope it helps.

    0 讨论(0)
提交回复
热议问题