
GCC 8.2 Released - edelsohn
https://gcc.gnu.org/gcc-8/changes.html#GCC8.2
======
thestoicattack
> When reporting on mismatching template types, the C++ compiler will now use
> color to highlight the mismatching parts of the template, and will elide the
> parameters that are common between two mismatching templates, printing [...]
> instead

I'll be interested to see if [...] can make instantiation error messages a lot
smaller. I hope so.

Also:

> AddressSanitizer integration for std::vector, detecting out-of-range
> accesses to the unused capacity of a vector.

~~~
karrotwaltz
The most verbose type of template errors I can think of are instantiation
errors with multiple candidates and type deduction failures. In these cases
there won't be any elision so it won't help much.

I still hope one day we'll see GCC & clang implement some kind of parsable
diagnostic output (e.g JSON). Simply folding all the candidates on a UI would
be a massive step forward in reading template errors.

~~~
jcelerier
> Simply folding all the candidates on a UI would be a massive step forward in
> reading template errors.

well... that's already what happens if you use an IDE ? That's at least the
case on Qt Creator

~~~
karrotwaltz
I've heard a lot of good about QtCreator lately, from multiple people, I'll
give it a try soon.

Still, some parsable output would be great for many cases, a CI with
diagnostic on a web page for example

------
jhoechtl
Can anybody comment on the love for Clang vs. the declining importance of GCC?
As it seems to me:

GCC supports more platforms GCC creates more performant code

Is it a license thing or a technical driven issue?

~~~
hak8or
More performant I am not sure. Would have to see specific benchmarks comparing
and the assembly for the newest gcc and newest clang.

The reaosn why I vastly prefer clang is for three main reasons.

Firstly, clang and llvm are written in c++ so it's much easier for me to work
with. Secondly, it has proper documentation on how to, for example, add new
optimization passes or adding a new instruction. This includes tons of talks
and presentations on doing this live. Thirdly, the tooling for it is great,
such as clangd, llc, lld, clanggtidy, etc.

Gcc seems to have none of this. Oh, and almost forgot, most importantly llvm +
clang is actually open source (more open) via a MIT license instead of gpl.

~~~
callinyouin
I was with you until the end of your comment: > llvm + clang is actually open
source (more open) via a MIT license instead of gpl

How is a license that allows someone or some corporation to take some code,
add to it, and make those additions proprietary "more open" than a license
that specifically disallows that type of scenario? The GPL ensures that
derived code stays open while MIT does not. In my eyes, that's "actually open
source". I can see the argument that licenses like MIT allow consumers of some
piece of code more freedom to do as they please, but that hardly makes it more
open.

~~~
protomyth
_How is a license that allows someone or some corporation to take some code,
add to it, and make those additions proprietary "more open" than a license
that specifically disallows that type of scenario?_

This gets argued all the time. What the corporation did was freedom for them
not the code. GPL protects the code, MIT/BSD protects the people. Depending on
your definition of "freedom" you will prefer one over the other.

~~~
wtetzner
GPL protects the freedom of the users of the software.

~~~
protomyth
It protects the code which happens to protect the users, but it doesn't let
people do whatever they want with the code. Which you prefer is up to you.
Using the word freedom is just problematic when there are restrictions.

------
bluecalm
Is there any significant work done on GCC optimizer these days? Most of the
changes in recent releases are about nicer error messages (which I love),
sanitizers/UB detection (which I also love), new C++ features support (which I
think is waste of brain power and time but well, most people like it) but
there is little in optimizer department.

From me experience GCC generates by far the fastest code (faster than Intel,
Clang and Visual Studio). I realize it's hard to make progress after so many
years but I am wondering if there is any promising direction which is
researched these days or is it only about small fixes here and there.

~~~
rurban
There needs to be work done, because for my usecases icc is usually a few
percentages faster and newer clang almost twice as fast, with proper constexpr
support. It's only memset, memcpy though, so who cares.

~~~
rurban
To the downvoters: This is the benchmark where GCC looses big time to clang:
[https://github.com/rurban/safeclib/blob/master/tests/perf_me...](https://github.com/rurban/safeclib/blob/master/tests/perf_memcpy_s.c)

My clang compiled memcpy_s is faster than the handoptimized glibc assembler
and twice as fast than the GCC version. So with a proper compiler you can get
rid of handoptimized unportable optimizations easily. In this case memcpy, but
also memset, memmove, memchr, ...

------
pyler
This release also fixes LTO bug with large binaries

------
112233
Have they added a way to turn off spellcheck suggestions yet? Compiling with
newer gcc feels like some monty python skit:

    
    
        #include <stdio.h>
        int main() { retrun 0; }
    
        $ gcc a.c
        a.c: In function ‘main’:
        a.c:2:14: error: ‘retrun’ undeclared (first use in this function); did you mean ‘setbuf’?
    

Say gcc, why don't you try 'setbuf' yourself before suggesting it? Ugh...

------
SloopJon
Meanwhile, RHEL 7 uses GCC 4.8, which first shipped five years ago. How about
the Red Hat Developer Toolset? Is that pretty commonly used, or do most Red
Hat users stick with the default packages?

~~~
misnome
Lucky you. We’re stuck on RHEL 6. That’s GCC 4.4. And nobody we knows installs
the toolset (I think the target user also needs to have it, because C++ libs?)

~~~
gusmd
Nope, your users need not have the toolset, that's the beauty of it! It
creates binaries compatible with any distribution newer than the machine where
you are compiling. E.g., if building on CentOS 6.7, anyone on 6.7+ can run
your binaries.

We also have an application stuck on RHEL 6 because of end-users, and I'm
happily using devtoolset-7 which gives me GCC 7.x, and quite a bit of C++17
support :)

Edit: My understanding is that it achieves that by statically linking in the
"newer" parts of libstdc++.

------
rurban
Tile-Gx is dead? That's sad and a bit early. Afaik MikroTik routers, the
fastest routers available, are still selling.

------
pyler
And LLVM 7.0 rc 1 soon too - Aug 1 :)

------
shawabawa3
Seems like a minor bugfix release, not what special relevance or interest this
has

------
paulirwin
Here are the release notes:
[https://gcc.gnu.org/gcc-8/changes.html#GCC8.2](https://gcc.gnu.org/gcc-8/changes.html#GCC8.2)

~~~
majewsky
Mods: Can you change the submission to point to this instead?

~~~
sctb
Sure thing. Thanks! Updated from
[https://gcc.gnu.org/ml/gcc/2018-07/msg00378.html](https://gcc.gnu.org/ml/gcc/2018-07/msg00378.html).

