Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
GNU is Not Unix Open Source Software Upgrades

GCC 5.1 Released 78

kthreadd writes: Version 5.1 of GCC, the primary free software compiler for GNU and other operating systems, has been released. Version 5 includes many changes from the 4.x series. Starting with this release the default compiler mode for C is gnu11 instead of the older gnu89. New features include new compiler warnings, support for Cilk Plus. There is a new attribute no_reorder which prevents reordering of selected symbols against other such symbols or inline assembler, enabling link-time optimization of the Linux kernel without having to use -fno-toplevel-reorder. Two new preprocessor directives have also been added, __has_include and __has_include_next, to test the availability of headers. Also, there's a new C++ ABI due to changes to libstdc++. The old ABI is however still supported and can be enabled using a macro. Other changes include full support for C++14. Also the Fortran frontend has received some improvements and users will now be able to have colorized diagnostics, and the Go frontend has been updated to the Go 1.4.2 release.
This discussion has been archived. No new comments can be posted.

GCC 5.1 Released

Comments Filter:
  • by Anonymous Coward on Wednesday April 22, 2015 @02:55PM (#49530819)

    It is explained well here: http://www.spinics.net/lists/linux-kbuild/msg11056.html

  • c++ 14 eh? (Score:2, Flamebait)

    by Cafe Alpha ( 891670 )

    c++ is now officially more complicated than Starbuck's menu.

    • The language standard is larger: of course.

      A bit, though not all that much is the core language.

      A lot is the libraries.

      For a user, the language is easier to use as it's more regular than it used to be, and more obvious idiomatic modern C++ code does the most efficient thing too, so fewer dangerous hacks needed.

    • It's always been a complicated language. The recent C++ 11/14 are significant improvements though, and in many ways actually make things quite a bit simpler and safer for the typical programmer in many ways. A lot of the footprint of C++ as a language is the incredible dedication to backwards compatibility. Even the earliest C++ programs (as well as C libraries, of course) will still compile even in modern compilers with minimal modifications.

      With the addition of standardized smart pointers, and making p

      • So as someone who more used to C++98, is there something that will take me, not just to the constructs of C++14, but also to the style and idioms of C++14?

        • by emarkp ( 67813 )

          Scott Meyers is his usual excellent self: http://www.artima.com/shop/ove... [artima.com]

        • Re:c++ 14 eh? (Score:5, Informative)

          by Dutch Gun ( 899105 ) on Wednesday April 22, 2015 @05:54PM (#49532359)

          Hmm... let's see... First off, you'll probably have better luck searching for C++ 11 than C++ 14, which were very subtle changes compared to 11, and not worth worrying about when first learning. You can read up on what changed in 14 later.

          In a nutshell, I'd say that the biggest change is the notion that you should very rarely have to use raw pointers any more, meaning you generally shouldn't allocate or release memory with new or delete. By applying RAII principle and smart pointers, you can virtually eliminate all chances of accidental resource and memory leaks.

          What's more, you get almost the same sense that you're using a language with managed memory, since you don't typically have to use delete, and even writing destructors becomes much more rare. So, I'd probably start by learning about the smart pointers and which versions to use when, how to properly cast them, and how to use the factory functions in place of 'new'.

          I picked up a lot of information on the web via simple tutorial blogs [codeproject.com] about specific topics, but I also read through Stroustrup's book The C++ Programming Language (fourth edition) [amazon.com] as a definitive reference.

          Don't feel the need to rush into all the new features. Just start with the basics (nullptr, auto, smart pointers, class enum), and then move to more advanced topics (move semantics, lambas, etc).

          Good luck!

          • Hmm... let's see... First off, you'll probably have better luck searching for C++ 11 than C++ 14, which were very subtle changes compared to 11, and not worth worrying about when first learning. You can read up on what changed in 14 later.

            Actually, I disagree. The C++14 stuff was stuff that they wanted to put in C++11 but didn't have time. It's almost all stuff that ought to work in C++11 but doesn't. I think the language is actually more obvious and straightforward with C++14 than C++11.

            It's things like re

            • I think you misunderstand me a bit. I'm not saying to start with C++ 11 vs 14 as a language, only that you're going to get better results searching for C++ 11 on the internet when trying to find tutorials about how to use most of those new features. Most of those new articles were written when C++ 14 was not yet ratified. No one wrote new tutorials about how to use shared_ptr when C++ 14 was released because nothing really changed in terms of the basics.

              Incidentally, I would never advocate the "progress

          • by Anonymous Coward

            By applying RAII principle and smart pointers, you can virtually eliminate all chances of accidental resource and memory leaks.

            It does not necessarily imply efficient memory management, though, since it is only guaranteed that the memory will eventually be freed, rather than as soon as it is actually unneeded. There is no real substitute for competent programming.

            • It does not necessarily imply efficient memory management, though, since it is only guaranteed that the memory will eventually be freed, rather than as soon as it is actually unneeded.

              No, it's all reference counted, meaning that as soon as the object goes out of scope, the reference count decreases, and if it hits zero, the memory is freed right then and there. It doesn't work like languages with managed memory and a garbage collector, such as Java or C#. When memory gets freed is 100% deterministic.

              Of course, if you mean that you could lose track of shared pointers, that's true enough. But that's also true in *any* language that I'm aware of, so C++ is no different in that regard. N

    • Will C++20 be C++ Venti?

  • by BigDaveyL ( 1548821 ) on Wednesday April 22, 2015 @03:59PM (#49531407) Homepage
    with 4.9.2!
  • Hi Slashdot. In the tagline beneath the article title, I believe you meant to say "Brand GNU".

Think of it! With VLSI we can pack 100 ENIACs in 1 sq. cm.!

Working...