Announcement

Collapse
No announcement yet.

Clang Goes Ahead And Enables C11 By Default

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Clang Goes Ahead And Enables C11 By Default

    Phoronix: Clang Goes Ahead And Enables C11 By Default

    LLVM's Clang C/C++ compiler went ahead and enabled C11 as the default C language for the upcoming LLVM 3.6 release...

    http://www.phoronix.com/vr.php?view=MTgyMzM

  • #2
    Originally posted by siavashserver
    Have they implemented C11 threads too?
    They don't have their own libc so no.

    Comment


    • #3
      Originally posted by siavashserver
      Have they implemented C11 threads too?
      Yes.
      12345chars

      Comment


      • #4
        Originally posted by siavashserver
        Have they implemented C11 threads too?
        Not that I know. C11 threads and atomics optional headers are not exposed in the recently uncovered Xcode 6 (when compiling in C11); so the clang version they used there doesn't have it. Giving a brief look to the LLVM/Clang mailing list, it doesn't seem as they are working on it. Which is a real pity.

        However, the developers in GCC seems to be developing them at a good pace. The only real possibility for using C11 threads right now is under windows and with C libraries such as musl.

        Comment


        • #5
          Originally posted by magika View Post
          Yes.
          12345chars
          That shows C++11 thread support, nothing about C11

          Comment


          • #6
            Originally posted by TechMage89 View Post
            That shows C++11 thread support, nothing about C11
            Whoopsie. (ノ≧ڡ≦)

            Comment


            • #7
              Originally posted by san_dehesa View Post
              Not that I know. C11 threads and atomics optional headers are not exposed in the recently uncovered Xcode 6 (when compiling in C11); so the clang version they used there doesn't have it. Giving a brief look to the LLVM/Clang mailing list, it doesn't seem as they are working on it. Which is a real pity.

              However, the developers in GCC seems to be developing them at a good pace. The only real possibility for using C11 threads right now is under windows and with C libraries such as musl.
              Neither Clang and GCC includes an implementation of the C standard library. Both compilers support the C11 / C++11 memory model including the atomic operations. It's not up to them to provide the library features.

              Comment


              • #8
                Originally posted by TechMage89 View Post
                That shows C++11 thread support, nothing about C11
                Clang implements the language features required for C11 threads like _Thread_local, atomics and the memory model. The rest is up to the C standard library implementation but it's trivial to implement because it's just a subset of POSIX threads.

                Comment


                • #9
                  Originally posted by strcat View Post
                  Clang implements the language features required for C11 threads like _Thread_local, atomics and the memory model. The rest is up to the C standard library implementation but it's trivial to implement because it's just a subset of POSIX threads.
                  And clearly a non-exist priority with GLibc.

                  https://sourceware.org/bugzilla/show_bug.cgi?id=14092

                  Comment


                  • #10
                    Originally posted by strcat View Post
                    Neither Clang and GCC includes an implementation of the C standard library. Both compilers support the C11 / C++11 memory model including the atomic operations. It's not up to them to provide the library features.
                    Yes, you are right. Clang and GCC don't have any saying more than implementing the compulsory C11 features; as the keywords _Atomic and _Generic and the memory model.

                    What I meant with my last line is that the guys at glibc (C library used by Linux) started to implement C11 optional headers (stdatomic.h and thread.h). So hopefully they will have something soon and developers can start using C11 threads in Linux (with the latests gcc compiler).

                    It is a real pity that the internal C library for OS X and iOS don't implement C11 threads I was looking forwarding using the C11 memory model. It seems pretty sweet.

                    Comment

                    Working...
                    X