Announcement

Collapse
No announcement yet.

Linux Kernel Moving Ahead With Going From C89 To C11 Code

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

  • Linux Kernel Moving Ahead With Going From C89 To C11 Code

    Phoronix: Linux Kernel Moving Ahead With Going From C89 To C11 Code

    It looks like for the Linux 5.18 kernel cycle coming up it could begin allowing modern C11 code to be accepted rather than the current Linux kernel codebase being limited to the C89 standard...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Yay for // style comments instead of the /* */ ones that I always forget which side the * goes on! Without a color coding text editor I was always like how do I block comment in this C/C++ program!

    Comment


    • #3
      As I regularly compile my Kernel with -std=gnu18 (GCC) or -std=gnu2x (Clang), everyone can try it out already if they are using a recent enough version. Of course I hope that using some of the new language features bring user-visible improvements, too.

      Comment


      • #4
        Originally posted by ms178 View Post
        Of course I hope that using some of the new language features bring user-visible improvements, too.
        Given the low-level nature of C, is that likely?

        Comment


        • #5
          I really like those new additions to the kernel. The -Werror addition was great, too.

          Comment


          • #6
            In 67 years from now we will likely hit the famous Year 89 bug...

            Comment


            • #7
              Does it mean we will be able to use VLA arrays in Linux too?

              Comment


              • #8
                Originally posted by kylew77 View Post
                Yay for // style comments instead of the /* */ ones that I always forget which side the * goes on! Without a color coding text editor I was always like how do I block comment in this C/C++ program!
                Well, the first character begins like //

                Comment


                • #9
                  Originally posted by piotrj3 View Post
                  Does it mean we will be able to use VLA arrays in Linux too?
                  VLA arrays seem to have been removed from the kernel some years ago because of security and portability concerns: https://www.phoronix.com/scan.php?pa...-Kills-The-VLA

                  Comment


                  • #10
                    Originally posted by piotrj3 View Post
                    Does it mean we will be able to use VLA arrays in Linux too?
                    I don't think so. How do you handle the error, when the memory is not sufficient? You can easily get a stack overflow.

                    Comment

                    Working...
                    X