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

  • #11
    I have an odd question. Do the kernel dev's actually go through and install that version (5.1) of GCC and use as their daily driver? As an example on openSUSE, the base compiler is 7.5 so they would have to seriously go out of their way to install such an old compiler.

    Comment


    • #12
      Originally posted by dekernel View Post
      I have an odd question. Do the kernel dev's actually go through and install that version (5.1) of GCC and use as their daily driver? As an example on openSUSE, the base compiler is 7.5 so they would have to seriously go out of their way to install such an old compiler.
      maybe on one machine, but this isbwhat ci pipelines are for, testing all supported things

      Comment


      • #13
        I think it's a very nice move to update to a newer standard and hope this could also help new maintainers to be comfortable to contribute.

        And I also aware that I'm commenting on Phoronix forum, so I expect to see someone coming here and starting a fuss about "how this change is bad because I don't like changes" like unfortunately I do with some other tech here. But I hope I'm wrong on the latter

        Comment


        • #14
          Originally posted by furtadopires View Post
          I think it's a very nice move to update to a newer standard and hope this could also help new maintainers to be comfortable to contribute.

          And I also aware that I'm commenting on Phoronix forum, so I expect to see someone coming here and starting a fuss about "how this change is bad because I don't like changes" like unfortunately I do with some other tech here. But I hope I'm wrong on the latter
          It sometimes feels like looking at an Amazon reviews that has 99.9% positive review. I immediately go to the 1-star review and it's always something idiotic like "I don't like the color". I'm no a coder and don't know much the difference between C89 and C11 but I surmise, besides it just being newer, some annoyances and limitations around the C89 standard were improved upon in C11? I'd also hazard a guess that even with C11 one can pass a flag or switch to tell the C11 compiler to force-use the C89 standard? Someone enlighted us on what's better in C11 than C89 besides just the improved commenting format. If it makes things better and all benefit, then it's good no?

          Comment


          • #15
            Originally posted by dekernel View Post
            I have an odd question. Do the kernel dev's actually go through and install that version (5.1) of GCC and use as their daily driver? As an example on openSUSE, the base compiler is 7.5 so they would have to seriously go out of their way to install such an old compiler.
            I doubt it. Testing different compilers are probably automated.

            Comment


            • #16
              Originally posted by kozman View Post
              Someone enlighted us on what's better in C11 than C89 besides just the improved commenting format.
              Some information about what's changed can be found in this article.

              Comment


              • #17
                Considering how annoyed Linus is because of the bad shape the C standard is in, maybe we'll see an at least partial R...-based rewrite sooner than expected? At least I expect some changes in the near future.

                So "undefined" behavior means that changes to code that isn't even near the code in question can change what the code generation for that code is.
                And the compiler may not even report it.
                That is a complete disaster.
                It's a disaster from a security standpoint, it's a disaster from a maintenance standpoint, it's just *bad*.

                Comment


                • #18
                  Originally posted by kozman View Post
                  I'd also hazard a guess that even with C11 one can pass a flag or switch to tell the C11 compiler to force-use the C89 standard? Someone enlighted us on what's better in C11 than C89 besides just the improved commenting format. If it makes things better and all benefit, then it's good no?
                  There are articles on other sites that wrote with more details why they're making these changes right now, but in summary the newer standard can help with security vulnerabilities and the C11 compiled code is backward compatible with C89.

                  Comment


                  • #19
                    Originally posted by furtadopires View Post
                    There are articles on other sites that wrote with more details why they're making these changes right now, but in summary the newer standard can help with security vulnerabilities and the C11 compiled code is backward compatible with C89.
                    That's two birds with one stone then. Good to hear. So only C17 is newer than C11, right?

                    Comment


                    • #20
                      Originally posted by kozman View Post

                      That's two birds with one stone then. Good to hear. So only C17 is newer than C11, right?
                      C23 is almost done.

                      Comment

                      Working...
                      X