Announcement

Collapse
No announcement yet.

GCC 5 Might Switch Its Default C Version To "GNU11"

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

  • #21
    Originally posted by pal666 View Post
    you decided to spend this day making fool of yourself ? i didn't say msvc supports c11, i even explicitly said it doesn't. i said it supports only latest implemented language version. and i didn't say it is faster than gcc. i said gcc is three years late. i have not seen reference from you regarding "no compiler..." bullshit
    Show me where exactly MS claims they will only the latest language version and we will talk about who is making a fool of themselves after that.

    Comment


    • #22
      Why are GNU dialects the default instead of language standards? For projects using GNU extensions, switching the defaults to standards would make developers realise it, instead of inadvertently using them. Isn't it the main problem when switching from GCC to Clang? Also, a non-standard default may make it harder for beginners, and even allow worse (non-portable, broken,...) code to be written.

      In the OpenGL area, a frequent complaint against NVIDIA is that their drivers are more permissive and do not strictly follow the specification. Couldn't GCC's defaults also be considered a vendor lock-in attempt?

      Comment


      • #23
        Originally posted by kalrish View Post
        Why are GNU dialects the default instead of language standards? For projects using GNU extensions, switching the defaults to standards would make developers realise it, instead of inadvertently using them. Isn't it the main problem when switching from GCC to Clang? Also, a non-standard default may make it harder for beginners, and even allow worse (non-portable, broken,...) code to be written.

        In the OpenGL area, a frequent complaint against NVIDIA is that their drivers are more permissive and do not strictly follow the specification. Couldn't GCC's defaults also be considered a vendor lock-in attempt?
        Yeah, well, there's no question about gnuXX being about vendor lock-in. Honestly imo code that doesn't explicitly state C language version is broken anyway. It's not like you can't request standard C from gcc to make it be helpful for writing standards-compatible code. Also with gnuXX you'd immediately see from compiler switch that project is likely to rely on extensions

        Comment


        • #24
          Originally posted by RahulSundaram View Post
          Show me where exactly MS claims they will only the latest language version and we will talk about who is making a fool of themselves after that.
          I don't think MS claims anything. But they do have a habit of supporting draft features in their compilers before they're even standardized. For example, VS 2010 has lambda expression support! Regardless, there is nothing like "-std=c++11" flag in Visual Studio. In fact, to my knowledge, there is no flag to force any particular language standard in Visual C++ with the compiler supporting as much as it is implemented to support.

          Related/Off Topic: I've not been able to find the reference that bluntly states this, but Microsoft treats C as effectively obsolete. Here's something close to this sentiment:


          Microsoft follows the C++ standard only. If that pulls in pieces of C99, then so will Microsoft. But no more than the minimum required by the C++ standard.

          Comment


          • #25
            Originally posted by nslay View Post
            I don't think MS claims anything. But they do have a habit of supporting draft features in their compilers before they're even standardized. For example, VS 2010 has lambda expression support! Regardless, there is nothing like "-std=c++11" flag in Visual Studio. In fact, to my knowledge, there is no flag to force any particular language standard in Visual C++ with the compiler supporting as much as it is implemented to support
            Like you said, I have never seen them claim they will only support the latest implemented language. I don't think that is even feasible to do. Compilers including clang and gcc support draft features quite regularly as well. MS has a different way of introducing experimental features. For example



            "*Because this is an experimental language feature, to enable it in a project you must add this element to your .csproj file to enable the "Experimental" language version"


            Comment


            • #26
              Originally posted by RahulSundaram View Post
              Like you said, I have never seen them claim they will only support the latest implemented language. I don't think that is even feasible to do. Compilers including clang and gcc support draft features quite regularly as well. MS has a different way of introducing experimental features. For example



              "*Because this is an experimental language feature, to enable it in a project you must add this element to your .csproj file to enable the "Experimental" language version"


              Yes, I guess I worded this strangely. GCC and Clang do draft features regularly. The difference is GCC and Clang require you to actually turn those features on (-std=c++11, -std=c++1y, -std=c++14). Visual C++ does not.

              The strongest example is lambda expressions in Visual Studio 2010 (because they're an actual change to the language syntax). Make a new project in VS 2010, write a lambda expression and compile it. No special settings needed.

              Lambda expressions aren't the only example. VS 2010 pulls quite a few C++11 STL data structures into std as well (to be clear, but std, not std::tr1). Some existing STL data structures have C++11 behavior in VS 2010 too (like std::map::erase).

              As for your blog post. Indeed, I could believe there are special experimental language settings in Visual C# (csproj is a Visual C# project file). But this is not the case for Visual C++ (at least ones that I'm familiar with, VS 2008, 2010, 2012 and 2013).

              Oh I forgot:
              VS 2010 supports rvalue references and move constructors (and helper functions like std::move) and has supported these features for production code (no special settings needed) before C++11 was finalized.

              This is typical Microsoft behavior.
              Last edited by nslay; 08 October 2014, 08:52 PM.

              Comment


              • #27
                Originally posted by pal666 View Post
                wrong. when new standard is backwards compatible, compiler support has to become available only in compiler which switched default.
                Actually C11 is not fully backwards compatible since it includes many new symbols that were not reserved before and it includes new behavior and rules in some cases (FILE can be a incomplete type, gets was removed, VLAs and complex variables and functions are now optional, etc..). But I don't think it would cause any problem in most software.

                Comment


                • #28
                  This is nice and all, but im still waiting for <threads.h> support (for like 3 years).
                  Kinda wish that we finally had a push towards portable threads, even if only for _some_ architectures (x86, arm).

                  Yeah, it's "optional", but still, it would have been nice.

                  Comment

                  Working...
                  X