It's worth noting that, due to GCC's new and esoteric version numbering scheme[1], this is a bugfix-only release on the 5.x branch. The bigger news was when GCC 5.1 (a major stable release) was released in April. That said, GCC 5.2 fixes a pretty serious bug that I was hitting so I'm happy to hear about it! [1] https://gcc.gnu.org/develop.html#num_scheme
They switched the default C compilation mode from --std=gnu89 to --std=gnu11 in a bugfix-only release?
GCC 5.2 released
31–38 of 38 posts
Re: GCC 5.2 released
#32> Write-only variables are now detected and optimized out. That's probably something one should keep in mind when writing micro-benchmarks.
I'm appalled that this wasn't taken care of 20 years ago. It seems like such low-hanging fruit.
Re: GCC 5.2 released
#33Earlier quoted context omitted.
I'm appalled that this wasn't taken care of 20 years ago. It seems like such low-hanging fruit.
This is a standard compiler feature, yes -- lots of real code out there has a lot of dead writes, such as debugging code that has been only partly removed or disabled. Historically, it's been a significant win for some of the SPECcpu benchmarks.
But doesn't it mean that you're not really executing the full benchmark then?
Re: GCC 5.2 released
#34Re: GCC 5.2 released
#35Earlier quoted context omitted.
This is a standard compiler feature, yes -- lots of real code out there has a lot of dead writes, such as debugging code that has been only partly removed or disabled. Historically, it's been a significant win for some of the SPECcpu benchmarks.
Historically, it's been a significant win for some of the SPECcpu benchmarks. But doesn't it mean that you're not really executing the full benchmark then?
Re: GCC 5.2 released
#36Does the LLVM+Clang combo make GCC obsolete?
Re: GCC 5.2 released
#37Hi guys, any idea when we might get this on mingw?
Re: GCC 5.2 released
#38Earlier quoted context omitted.
I'm appalled that this wasn't taken care of 20 years ago. It seems like such low-hanging fruit.
This is a standard compiler feature, yes -- lots of real code out there has a lot of dead writes, such as debugging code that has been only partly removed or disabled. Historically, it's been a significant win for some of the SPECcpu benchmarks.
Link-time optimization can delete a lot more stuff when you're building a program directly, since it only has to keep main()… as long as you didn't go and use things like function pointers.
This is one reason I try to use '-fvisibility=hidden' in libraries, because it prevents anything from being part of the API unless you go back and specifically export it.