8 ms·
GCC 9.1 Released
- diegocg 7y agoRelated link: GCC 9: Link-time and inter-procedural optimization improvements https://hubicka.blogspot.com/2019/05/gcc-9-link-time-and-inter-procedural.html https://hubicka.blogspot.com/2019/05/gcc-9-link-time-and-int...
- deleted 7y ago[deleted]
- qalmakka 7y agoI'm building it right now, I'm very curious to try the new features and especially the improved diagnostics. The competition between Clang and GCC has been a blessing, they're both better than ever.
- ausjke 7y ago"In this release C++17 support is no longer marked experimental. The C++ front-end implements the full C++17 language (already previous GCC major version implemented that) and the C++ standard library support is almost complete. The C++ front-end and library also have numerous further C++2a draft features [1]. GCC has a new front-end for the D language. GCC 9.1 has newly partial OpenMP 5.0 support and almost complete OpenACC 2.5 support." Awesome stuff, happy to see healthy competition between GCC and Clang these days
- umvi 7y agoFor anyone wanting an easy way of trying it out, I recommend grabbing `zbeekman/nightly-gcc-trunk-docker-image:latest` from Docker Hub, which has the latest version of GCC pre-built (which, actually looking it it right now is 10.0) - also, see GitHub landing page for it[1]. I find this to be the easiest way to try out new GCC versions and I actually use it exclusively for building testing my GCC 9 projects. With just a small wrapper Dockerfile, you can easy accommodate CMake or any other build dependencies. For example, I have one I use for building CMake projects[2] (see README of same project for example of how to use said docker image). GCC 9 is great, by the way. One of the best improvements, IMO is that gcov can now print coverage reports to stdout in JSON format which means you can take advantage of parallel computing to generate coverage reports fast. The Dockerfile I linked to in [2] above is a part of a utility I made as a drop-in replacement for lcov and can generate lcov reports at times up to 100x faster thanks to GCC 9 improvements. [1] https://github.com/zbeekman/nightly-gcc-trunk-docker-image https://github.com/zbeekman/nightly-gcc-trunk-docker-image [2] https://github.com/RPGillespie6/fastcov/blob/master/Dockerfile https://github.com/RPGillespie6/fastcov/blob/master/Dockerfi...
- cozzyd 7y agogcc is not particularly hard to build from source either.
- umvi 7y agoI had a heck of a time getting it to build under Ubuntu. It was simple under OpenSUSE however (I followed the instructions both times)
- Keyframe 7y agoWhat problems did you have? It's dead easy.
- umvi 7y agoUnder Ubuntu 18.04 I followed the instructions here: https://gcc.gnu.org/wiki/InstallingGCC https://gcc.gnu.org/wiki/InstallingGCC And everything went well until the `make` step - it just blew up with a million compiler errors. I did the same thing under OpenSUSE and it built just fine.
- ComputerGuru 7y agoWith C++, a million errors are oftentimes one error a million different ways.
- pkaye 7y agoIts one error after name mangling.
- magicalhippo 7y agoFlashback... When trying C for the first time, I ported a ~300 line Pascal program. I had read C syntax for some time, and the program was rather simple so I felt confident in the job. After transcribing the ~300 lines I tried to compile for the first time: 3728 errors and warnings... I read through the code and everything looked correct, so I gave up. Picked it up again some weeks later. Turned out that I had, by force of habit, erroneously added a semicolon at the end of macro definition on line 3. Fixing that it compiled flawlessly. At the time I was also unaware that I was actually using a C++ compiler, djgpp, which I'm sure did the error count no favors.
- tntn 7y agoAnyone know what happened circa GCC 5 that changed the version number scheme? It felt like GCC 4 was around forever and now they do whole number increments every year or so.
- ajross 7y agoFashion. GCC isn't a library, so doesn't have the same kind of hard compatibility concerns that major version numbers are supposed to reflect. Other stuff at the same time started doing the same stuff (c.f. Fedora, Firefox, Chrome), so they did too. Other GNU projects did likewise: Emacs spent a few decades to get from 19 to 21, and now all of a sudden we're at 26.
- kristjansson 7y agoYet other libraries/compilers (e.g. CUDA/nvcc) will still bail out if the major version number of gcc is different than they expect...
- avar 7y ago> Emacs spent a few decades to get from > 19 to 21, and now all of a sudden we're > at 26. It's just the span between 21 and 22 that took unusually long[1]. The first Emacs 19.* came out in 1993, last 21.* in 2001. So 3 major releases in 8 years, roughly one every 2.5 years. The first Emacs 22.* came out in 2007, and 26.* in 2018, so 5 major releases in 11 years, roughly one every 2.2 years. Whereas 21.* to 22.* took from 2001 to 2007, or around 6 years. Here's an LWN article from 2007 covering why it took so long: https://lwn.net/Articles/234593/ https://lwn.net/Articles/234593/ Not everything gets worse as you get older, except perhaps confirmation bias :) 1. https://en.wikipedia.org/wiki/GNU_Emacs#Release_history https://en.wikipedia.org/wiki/GNU_Emacs#Release_history
- ajross 7y agoYour subtractions are off by one because you're treating the boundary as a "release" without accounting for the previous inter-release period. Those periods reflect, respectively, TWO major releases in 8 years, and FOUR major releases in 11 years. So things since 22 are about about 50% faster by my reckoning, which is notable but maybe not as much as as my intuition held.
- jandrewrogers 7y agoIt is great to see GCC's C++17 language support coming along and more effort being put into getting draft standard features in early, as its C++17 support was quite buggy even a year after the official standard release. C++ language support is one area where Clang has typically been ahead of GCC. The competition between the compilers has been great for compiler users.
- bachmeier 7y agoAdded in this release: D Language (release 2.076).
- earenndil 7y agoFrom https://gcc.gnu.org/gcc-8/porting_to.html https://gcc.gnu.org/gcc-8/porting_to.html: > The alignof operator has been changed to return the minimum alignment required by the target ABI, instead of the preferred alignment (consistent with _Alignof in C) > Code which uses alignof to obtain the preferred alignment can use __alignof__ instead So, there's an alignof and an __alignof__ function, which do similar but subtly different things? That sounds like a recipe for disaster.
- kanox 7y agoThis is extremely common? After all, what does __ signal if not "suble difference"?
- ComputerGuru 7y agoVendor-specific/non-standard?
- earenndil 7y agoDefinitely not 'subtle difference'; when has it ever meant that? It means a nonstandard extension.
- comex 7y agoGCC extensions in particular tend to support multiple spellings of the same keyword with different numbers of underscores, which usually do exactly the same thing. For example, you can write asm, __asm, or __asm__; typeof, __typeof, or __typeof__; __attribute or __attribute__; etc. The versions with no underscores only with with a setting of -std that includes GNU extensions, while the versions with underscores always work (because names starting with underscores are reserved by the spec). Even alignof has __alignof and __alignof__ as two spellings of the GNU variant. But unlike with typeof, for whatever reason, plain "alignof" was never supported in C as a GNU extension; it only ever worked in C++ mode, as a standard feature from C++11. That makes it slightly less weird to create a difference. But only slightly; I'm more familiar with GCC esoterica than most people and I had no idea "alignof" was C++-exclusive until I looked it up.
- 7y ago
- jedisct1 7y agoCan GCC compile to WebAssembly yet?
- brimstedt 7y agooff topic, but how come these pretty much text only mail archives adapt so bad to mobile browsers? I have to zoom and scroll back and forth to read them..
- mlindner 7y agoBecause it's a very simple HTTP 1.1 page with a block of text wrapped in <pre></pre> tags with fixed newlines. Preformmated text means your browser doesn't reformat it.
- deleted 7y ago[deleted]
- WalterGR 7y ago...which, it should be mentioned, is a consequence of this mailing list - and most similar ones - culturally preferring plain text formatting of emails rather than HTML.
- ComputerGuru 7y agoBecause instead of serving it as plaintext they (stupidly) serve it as HTML and are then forced to wrap it in pre tags as a hack to preserve formatting without fully converting from plaintext to HTML. Any other approach but this would have worked fine.
- saagarjha 7y agoThe page has links, so I don't see how serving it as plaintext would work.
- WalterGR 7y agoI have to zoom and scroll back and forth to read them.. Even in landscape? Do you have a problem with text in landscape for this particular URL, or you find that you frequently do? Are you on an iPhone? If no, yes, and yes, this may shed some light: https://stackoverflow.com/questions/2710764/preserve-html-font-size-when-iphone-orientation-changes-from-portrait-to-landsca https://stackoverflow.com/questions/2710764/preserve-html-fo...
- Pazzaz 7y agoWhat can the compiler actually do with '__builtin_expect_with_probability'? I understand that '__builtin_expect' can be used to choose which branch to prioritize but can you expect the optimizer to get better by having a probability attached?
- TheSoftwareGuy 7y agoThe compiler can choose which implementation to generate based on the actual expected performance gain in the happy case, the performance loss in the not happy case and use the probability to decide whether its actually worth the trade off
- rwj 7y agoDoes anyone know why the official docker images stop at version 8? https://hub.docker.com/_/gcc https://hub.docker.com/_/gcc
- danielhlockard 7y agoI'm sure PRs are welcome: https://github.com/docker-library/gcc https://github.com/docker-library/gcc It's community maintained.
- comex 7y agoBecause in GCC's confusing versioning scheme [1], "GCC 9.0" was never a stable release; that version number was used exclusively for development builds. So GCC 9.1 is the first GCC 9 worth packaging, and it just came out. (And by the time of my comment, the Docker page you linked has already been updated to mention it.) [1] https://gcc.gnu.org/develop.html https://gcc.gnu.org/develop.html
- mhh__ 7y ago> Support for the D programming language has been added to GCC, implementing version 2.076 of the language and run-time library. Well done Iain Buclaw (and co.)
- fwsgonzo 7y agoAnyone know how to manually build with LTO? How to call lto-wrapper and deal with the temporary objects created by lto1?