News for hackers. Stuff that matters.
Re:Usability Improvements in GCC 15 by duped on Thursday April 10, 2025 @12:14PM (#43645387)
It's not like GCC or the embedded toolchains are a shining beacon of ISO compliance... and if you mean video game consoles, are any of them using GCC today? Sony and Nintendo are both LLVM and Microsoft is Microsoft
Re:Usability Improvements in GCC 15 by pjmlp on Thursday April 10, 2025 @12:16PM (#43645419)
The difference being that vendors forks not compliant with GPL can be legally asked for the changes they haven't sent upstream.
Re:Usability Improvements in GCC 15 by duped on Thursday April 10, 2025 @12:58PM (#43645873)
With LLVM they don't need to fork it in the first place. But still, it doesn't matter because ISO compliance is a frontend problem.

The one vendor who forks LLVM and doesn't contribute their biggest patches back is Apple, and if you want bleeding edge or compliance you're not using Apple Clang at all.

If you say "isn't it great vendor toolchains have to contribute back to upstream?" I'm going to say "no, it sucks that vendor toolchains have to exist"

Re:Usability Improvements in GCC 15 by mort96 on Thursday April 10, 2025 @03:59PM (#43647517)
Forcing vendors to contribute back upstream is an attempt at making vendor toolchains not exist.

If a company makes a new MCU with some exciting new instruction set, they need to make a compiler available which supports that instruction set and make that compiler available to their customers.

With LLVM as the base, the vendor could make their toolchain proprietary, making it impossible to integrate it back into LLVM, which means the vendor toolchain will exist until the ISA gets wide-spread enough for volunteers to invest the time required to make a separate production-quality LLVM back-end from scratch.

With GCC as the base, the vendor must at least make their GCC fork available to their customers under the GPL. This, in theory, allows the GCC community to "just" integrate the back-end developed by the vendor into GCC rather than starting from scratch.

Now I don't know how effective this is, or how much it happens in practice that the GCC project integrates back-ends from vendor toolchains. But in principle, it's great that vendors have to make their toolchains FOSS because it reduces the need for vendor toolchains.

Re:Usability Improvements in GCC 15 by dzaima on Thursday April 10, 2025 @08:35PM (#43649279)
gcc requires that contributors assign copyright to FSF (or at least "certify the Developer Certificate of Origin")[0], so a fork isn't gonna get upstreamed without the approval of the fork's authors. So that limits the benefit from gcc-forks to individuals keeping the fork alive.

[0]: https://gcc.gnu.org/contribute.html#legal

Re:Usability Improvements in GCC 15 by charcircuit on Thursday April 10, 2025 @09:38PM (#43649631)
>making it impossible to integrate it back into LLVM

Code getting open source is not impossible. Companies do it all of the time because it's expensive to rebase.

Re:Usability Improvements in GCC 15 by mort96 on Friday April 11, 2025 @02:02AM (#43650910)
Dude you can't just quote a fraction of a sentence and then argue against that fragment. Read the whole sentence. The part about how "the vendor could make their toolchain proprietary" is kinda important.
Re:Usability Improvements in GCC 15 by charcircuit on Friday April 11, 2025 @02:32AM (#43651055)
My comment was about proprietary software being open sourced.
Re:Usability Improvements in GCC 15 by mort96 on Friday April 11, 2025 @05:45AM (#43652133)
My comment was about forcing companies to not make proprietary software.
Re:Usability Improvements in GCC 15 by LeFantome on Thursday April 10, 2025 @10:24PM (#43649911)
Myth: GPL means more companies contribute to GCC

Previous reality: companies write fully proprietary code to avoid GCC

Current reality: companies choose Clang over GCC because of the license and then contribute many of their changes back.

Re:Usability Improvements in GCC 15 by pjmlp on Thursday April 10, 2025 @04:05PM (#43647576)
So are you aware how many contributions have actually been upstream by Sony, Nintendo, IBM, ARM, Green Hills, Codegear, TI, Microchip, Codeplay, NVidia, AMD, Intel, HP,.... ?

Because Apple certainly isn't alone.

Re:Usability Improvements in GCC 15 by trelane on Thursday April 10, 2025 @05:06PM (#43648018)
The question is less what's upstream than what's not.
Re:Usability Improvements in GCC 15 by pjmlp on Friday April 11, 2025 @01:23AM (#43650743)
The question is who is leeching clang while pumping the cash register.
Re:Usability Improvements in GCC 15 by bluGill on Thursday April 10, 2025 @12:56PM (#43645853)
Venders who use llvm quickly discover the cost of mainaining their own fork is too high and end up contributing back.
Re:Usability Improvements in GCC 15 by pjmlp on Thursday April 10, 2025 @04:13PM (#43647629)
The point was the whole clang package, and no they don't, plenty of examples.
Re:Usability Improvements in GCC 15 by LeFantome on Thursday April 10, 2025 @10:25PM (#43649916)
Except they do, plenty of examples (many already provided)
Re:Usability Improvements in GCC 15 by pjmlp on Friday April 11, 2025 @01:22AM (#43650738)
Examples yes, I provided the examples of everyone taking advantage while not contributing.

I am still waiting for the counter examples regarding clang contributions.

Re:Usability Improvements in GCC 15 by bluGill on Friday April 11, 2025 @08:29AM (#43653037)
Clang is in git with good tracking of who each contributor is - there are more than 4000.
Re:Usability Improvements in GCC 15 by uecker on Thursday April 10, 2025 @02:06PM (#43646559)
GCC has very good ISO compliance and ISO C23 is better supported than in Clang (which I expect to catch up soon though)
Re:Usability Improvements in GCC 15 by throwaway2037 on Thursday April 10, 2025 @09:09PM (#43649454)
Knowing the history of GCC (more focused on C) and Clang (more focused on C++), it makes sense to me that GCC has better ISO C compliance.

Clang has a very nice specific page for ISO C version compliance: https://clang.llvm.org/c_status.html#c2x

I could not find the same for GCC, but I found an old one for C99: https://gcc.gnu.org/c99status.html

CppRef has a joint page, but honestly, I am more likely to believe a page directly owned/controlled/authored by the project itself: https://en.cppreference.com/w/c/compiler_support/23

Finally, is there a specific feature of C23 that you need that Clang does not support?

Re:Usability Improvements in GCC 15 by uecker on Saturday April 12, 2025 @01:59AM (#43661737)
I would not say that GCC is more focused on C. Also in GCC there is a lot more effort going into C++ than C. C is generally neglected, which is sad given its importance.

GCC's support for C23 is essentially complete. Clang is mostly catching up, but features I need that I am missing are storage class in compound literals and tag compatibility. It is also sad that Clang does not implement strict aliasing correctly (it applies C++'s rules also in C).

Re:Usability Improvements in GCC 15 by bobmcnamara on Friday April 11, 2025 @10:00PM (#43660662)
"substantially complete" C99 even