News for hackers. Stuff that matters.
Re:GCC 16 considering changing default to C++20 by dagmx on Monday November 17, 2025 @10:31AM (#45954452)
This is about changing the default.

The issue with defaults is that people have projects that implicitly expect the default to be static.

So when the default changes, many projects break. This is maybe fine if it’s your own project but when it’s a few dependencies deep, it becomes more of an issue to fix.

Re:GCC 16 considering changing default to C++20 by reactordev on Monday November 17, 2025 @10:46AM (#45954611)
If you’re relying on defaults, and upgrade, that is entirely your fault. Don’t hold everyone in the world back because you didn’t want to codify your expectations.
Re:GCC 16 considering changing default to C++20 by dietr1ch on Monday November 17, 2025 @10:51AM (#45954658)
So it has the added benefit of having people learn how to set up their projects properly? Great.
Re:GCC 16 considering changing default to C++20 by bluGill on Monday November 17, 2025 @11:42AM (#45955289)
C++ is very good at compatibility. If your code breaks when the standard changes, odds are it was always broke and you just didn't know. C++ isn't perfect, but it is very good.
Re:GCC 16 considering changing default to C++20 by wat10000 on Monday November 17, 2025 @11:58AM (#45955467)
On the other hand, if you didn't know your code was broken then it probably wasn't broken in a way that's catastrophic to whatever you use it for.
Re:GCC 16 considering changing default to C++20 by MichaelZuo on Monday November 17, 2025 @10:38AM (#45954522)
That sounds more like a problem of nonsensical assumptions… what possible expectation could there have been that GCC would never change this in the future?
Re:GCC 16 considering changing default to C++20 by jayd16 on Monday November 17, 2025 @10:46AM (#45954613)
The assumption is along the lines of "this works so why should I ever think about it again if I don't have to?"

It's not an end user problem, anyway. The issue is the language didn't change in a backwards compatible way and also didn't require setting a language version.

Re:GCC 16 considering changing default to C++20 by nomel on Monday November 17, 2025 @07:05PM (#45959922)
Do you have an example? Adding the `--std=<whatever you're using now here>` flag should work, which you should already be using anyways. Is the issue that you don't want to use that argument?