GCC 15 Moves C Default Language Version To C23

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • phoronix
    Administrator
    • Jan 2007
    • 67074

    GCC 15 Moves C Default Language Version To C23

    Phoronix: GCC 15 Moving C Default Language Version To C23

    The GCC 15 compiler on Friday switched its default C language version from the GNU dialect of C17 to the current C23 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
  • klapaucius
    Senior Member
    • Mar 2015
    • 157

    #2
    Maybe I said this before, but I imagine the typical C developer still stubbornly coding in ANSI C

    Comment

    • illwieckz
      Senior Member
      • Jan 2008
      • 350

      #3
      Originally posted by klapaucius View Post
      Maybe I said this before, but I imagine the typical C developer still stubbornly coding in ANSI C
      Why ?

      Comment

      • NateHubbard
        Senior Member
        • Mar 2015
        • 577

        #4
        Originally posted by illwieckz View Post

        Why ?
        He answered that

        Originally posted by klapaucius View Post
        I imagine

        Comment

        • klapaucius
          Senior Member
          • Mar 2015
          • 157

          #5
          Originally posted by illwieckz View Post

          Why ?
          Just a prejudice. Let me put in this way, apart from dealing with legacy code (and certainly there's a lot in C) I don't see a valid reason in 2024 to start a new project in C instead of using a more modern language with higher level of abstractions. But there's still this common myth that C is *THE* language, upon which everything is built and must continue to be built, that is more performant than any other language, that coding in C gives you full control and forces you to be a better programmer, because you have to learn how to handle the intrinsic unsafety. Therefore any addition to the standard is considered an addition of complexity, of overhead, an aid that *real* coders don't need.

          Comment

          • illwieckz
            Senior Member
            • Jan 2008
            • 350

            #6
            Originally posted by klapaucius View Post
            Just a prejudice. Let me put in this way, apart from dealing with legacy code (and certainly there's a lot in C) I don't see a valid reason in 2024 to start a new project in C…
            No one said one should start a new project in C in 2024, and no one said 23 should only be used on new projects.

            There are thousands of C projects that are maintained that can benefit from a newer C (either when extending code, either when refactoring it).

            The C version used in a code base is not tied to the one used the day the first lines of such C code base were written long time ago…

            Comment

            • jacob
              Senior Member
              • Jul 2010
              • 2970

              #7
              Originally posted by klapaucius View Post

              Just a prejudice. Let me put in this way, apart from dealing with legacy code (and certainly there's a lot in C) I don't see a valid reason in 2024 to start a new project in C instead of using a more modern language with higher level of abstractions. But there's still this common myth that C is *THE* language, upon which everything is built and must continue to be built, that is more performant than any other language, that coding in C gives you full control and forces you to be a better programmer, because you have to learn how to handle the intrinsic unsafety. Therefore any addition to the standard is considered an addition of complexity, of overhead, an aid that *real* coders don't need.
              I think in 2024 C still has its place even for some new projects, particularly in the embedded and IoT areas. For one thing, C can be compiled for very low end and/or rare architectures that the more modern languages (Rust, D, Go, Zig etc) often don't support. It also often results in small binaries, suitable for systems with very small storage space and RAM. By the way that doesn't necessarily imply that it's more performant, just that it has lower hardware requirements.

              Comment

              • Volta
                Senior Member
                • Apr 2019
                • 2233

                #8
                Originally posted by klapaucius View Post

                Just a prejudice. Let me put in this way, apart from dealing with legacy code (and certainly there's a lot in C) I don't see a valid reason in 2024 to start a new project in C instead of using a more modern language with higher level of abstractions.
                I don't see a valid reason to use something else than C. Unless you're google and have handicapped programmers who wouldn't even qualify for outreachy.

                Comment

                • klapaucius
                  Senior Member
                  • Mar 2015
                  • 157

                  #9
                  exactly...

                  Comment

                  • F.Ultra
                    Senior Member
                    • Feb 2010
                    • 2028

                    #10
                    Originally posted by klapaucius View Post

                    Just a prejudice. Let me put in this way, apart from dealing with legacy code (and certainly there's a lot in C) I don't see a valid reason in 2024 to start a new project in C instead of using a more modern language with higher level of abstractions. But there's still this common myth that C is *THE* language, upon which everything is built and must continue to be built, that is more performant than any other language, that coding in C gives you full control and forces you to be a better programmer, because you have to learn how to handle the intrinsic unsafety. Therefore any addition to the standard is considered an addition of complexity, of overhead, an aid that *real* coders don't need.
                    C isn't C++ so additions to the standard is not really addition of complexity, mostly it is about clearing up what is and what isn't undefined behaviour and thus making it less complex.

                    C23 in particular adds the memset_explicit() which helps us to avoid the previous attempts of fooling the compiler. It also standardizes a lot of what used to be GCC builtins and also now allows labels to be before declarations so no longer a need to do "label:;" to fool the compiler.

                    There are lots of good reasons to start new projects in C in 2024 (every single project where I work is done in C). A major one is that you are a veteran level C programmer with over 20 years of experience, trying to start a project in Rust would be to start from close to scratch and transform the same person to a novice level programmer.

                    To be honest I see far more logic problems in applications than I see security issues, so IMHO the insecurity of C is way overblown (depends on context case ofc).

                    Comment

                    Working...
                    X