6 ms·
GCC 16 has been released
- starkparker 5mo ago[dead]
- t-3 5mo agoSomehow I never realized that GCC has a very regular release schedule until looking it up just now: https://gcc.gnu.org/develop.html https://gcc.gnu.org/develop.html
- tosti 5mo agoIIRC, since GCC got covered by GPL3. It used to be slower and I've spent way too much time working around C++ bugs in GCC 2.95 (The fact that I remember the problematic version is telling :)
- gpderetta 5mo agoEverybody remembers that specific version :). And I wasn't even programming professionally at that time!
- bluGill 5mo agoFor many years that was the only version that could be used. What become gcc3 took years. In the end it was better, but for a while gcc 2.95 was the best we had despite the bugs.
- kjs3 5mo agoOof...I know of at least 1 embedded shop still using 2.95.4 for various 'reasons'.
- pjmlp 5mo agoAh the egcs drama.
- physicsguy 5mo agoThey changed their major release numbers too tbf. 4.x it was point release per year, now it's a major release per year.
- r2vcap 5mo agoYeah, GCC’s recent major releases have been remarkably regular, much like Fedora’s spring releases, and their releases seem to fit into the same broader rhythm. Hint? Red Hat.
- uyjulian 5mo agoIt has been that way since people from Cygnus (now RedHat->IBM) reorganized the project
- not2b 5mo agoThat is why egcs was launched, to get around the inability of the old team to do gcc releases. The issues had little to do with ideology and were about fixing a broken process and replacing it with something that had a hope of working.
- bluGill 5mo agoLarge projects have been going to regular scheduled releases for a long time. Until the 90's people thought they could waterfall a large release with all your desired features (and for tiny projects this is still a good idea), but as your projects grow (possibly just to small) you reach a point where someone is always working on a feature that isn't ready yet, so a regular release means you still can support your customers with releases. This forces developers who are unsure they will be ready to have some sort of "disabled this unstable feature" toggle, which is about the best you can do.
- cogman10 5mo agoYup. OpenJDK is one of the best success stories of this. Up until Java 9, they would release once features were complete. But that meant there were years between the 7 and 8 release and even more years between the 8 and 9 release. The industry had gotten into the habit of always running old versions of Java (my company was on 6 for an uncomfortable amount of time. But others have had it worse). More frequent smaller releases has gotten companies more into the habit of updating frequently which also, very helpfully, gives devs new features frequently.
- jabl 5mo agoThe Linux kernel is another example. The 2.5 development cycle (which led to the stable 2.6 series) was brutally long, and distros resorted to back-porting new features into their own kernels based on the stable 2.4 series that they provided to their users, creating all kinds of excitement. After 2.6.0 was released, Linus basically went nope, not gonna do that again.
- bluGill 5mo agoAre there any large projects that are older than 25 years that didn't go through that? The time based release thing as been recommended for about 25 years (can anyone get real data?), so newer projects may just be using it without knowing the pain, but for older projects it seems like they all went through it at least once.
- xzstas 5mo agoI've already been using it for some time (debian sid has a trunk package). it has c++26 reflection, so I already do some magical things with reflection (much better for some cases e.g. for ser-des). I only wish they had a lsp server in their eco-system!
- klaussilveira 5mo agolibstd has been giving me issues running gcc 16 binaries on Debian 12 and 13.
- gjvc 5mo agoare you using -static-libstdc++ -static-libgcc ?
- gavinray 5mo agoI want to point out an implemented feature that people SHOULD be adopting but that I doubt will be picked up: P2590R2, Explicit lifetime management (PR106658) This is for "std::start_lifetime_as<T>". If you have not heard of this before, it's the non-UB way to type-pun a pointer into a structured type. Nearly all zero-copy code that deals with external I/O buffers looks something like: std::unique_ptr<char[]> buffer = stream->read(); if (buffer[0] == FOO) processFoo(reinterpret_cast<Foo*>(buffer.get())); // undefined behavior else processBar(reinterpret_cast<Bar*>(buffer.get())); // undefined behaviour With this merged, swap the reinterpret_cast for start_lifetime_as and you're no longer being naughty. https://en.cppreference.com/cpp/memory/start_lifetime_as https://en.cppreference.com/cpp/memory/start_lifetime_as
- groundzeros2015 5mo agoYou’re allowed to type pun char buffers.
- ozgrakkurt 5mo agoAnd should always use -fno-strict-aliasing anyways. The default rules are insane
- jcranmer 5mo agoNo, you're not. You're allowed to access any type via a char buffer. But the converse is not true (quoting https://eel.is/c++draft/expr#basic.lval-11 https://eel.is/c++draft/expr#basic.lval-11): > An object of dynamic type Tobj is type-accessible through a glvalue of type Tref if Tref is similar ([conv.qual]) to: Tobj, a type that is the signed or unsigned type corresponding to Tobj, or a char, unsigned char, or std :: byte type. If a program attempts to access ([defns.access]) the stored value of an object through a glvalue through which it is not type-accessible, the behavior is undefined. The dynamic type of a char buffer is, well, a char buffer, and can only be accessed via things that are the same type as a char buffer up to signedness and cv-qualification. The actual strict aliasing rules are not commutative!
- 5mo ago
- dapperdrake 5mo agoDoes -Ofast still ignore -fno-fast-math ?
- shevy-java 5mo agoI tried the unstable sources for a while, in the last ~3 months. I ran into some issues with some programs (could not compile them with recent GCC, but older GCC worked fine), so gcc 15.x works better for me in general (presently) - but from, say, +3000 programs to compile, the vast majority works well, and a few may need patches (which can often be found in LFS/BLFS by the way, they often use sed instructions to fix individual things and then it works usually). Hopefully they fixed those issues. We all need stability and things-to-work.
- sintax 5mo agoDid you file any bug reports for them?
- wg0 5mo agoNoob question - Does gcc use LLVM anywhere under the hood or it has its own code generation and optimization pipeline? How does it stack in comparison to LLVM?
- kelnos 5mo agoGCC far far far predates LLVM. They do not share code.
- fweimer 5mo agoThe libsanitizer library is imported from the LLVM sources into the GCC source tree. There are probably more examples of code sharing. Both projects are quite large.
- steve1977 5mo agoI would assume the code sharing is one-way only due to the licenses. I.e. a GPL project can use MIT licensed code, but not vice versa (AFAIK).
- mshockwave 5mo ago> Does gcc use LLVM anywhere under the hood No
- kouosi 5mo ago> Does gcc use LLVM anywhere under the hood or it has its own code generation and optimization pipeline? No it doesn't use LLVM > How does it stack in comparison to LLVM? Well it support more targets then LLVM and in most cases it generates similar if not better executable.
- sintax 5mo agoLet me wikipedia that for you :-) Like people mentioned already, gcc predates LLVM by quite some years, ie. Wikipedia mentions March 22, 1987 for gcc, while LLVM's initial release was 2003. A big difference between the 2 is also the license. GCC uses the GPL while LLVM uses Apache License, hence the projects don't share code.
- kmoser 5mo ago> The so-called "json" format for -fdiagnostics-format= has been removed in this release. Users seeking machine-readable diagnostics from GCC should use SARIF. But: > GCC can now output diagnostics in HTML form via -fdiagnostics-add-output=experimental-html I wonder what drove the decision to remove JSON output and add HTML output?
- rcfox 5mo agoIt looks like SARIF is JSON, with a formal schema. I'm guessing the JSON they used to output used their own, non-standard schema.