On Sun, Nov 16, 2025 at 02:25:21PM -0600, Segher Boessenkool wrote:
> On Sun, Nov 16, 2025 at 08:43:11PM +0100, Jakub Jelinek wrote:
> > On Sun, Nov 16, 2025 at 10:37:44AM -0600, Segher Boessenkool wrote:
> > > On Sun, Nov 16, 2025 at 12:06:57AM +0100, Jakub Jelinek wrote:
> > > > On Mon, Nov 03, 2025 at 01:34:28PM -0500, Marek Polacek via Gcc wrote:
> > > > > I would like us to declare that C++20 is no longer experimental and
> > > > > change the default dialect to gnu++20.
> > >
> > > Defaulting to something that is just a few years old is super
> > > aggressive, esp. because not many people will test building with
> > > something else, although we still support it (building a cross with a
> > > slightly older compiler, for example).
> > >
> > > So let's at least not got any further than this! Document that five
> > > years is the limit, even?
> >
> > This is not bumping the minimum version that gcc can be built with,
> > that stays to be C++14.
>
> Yes. But it changes the default used. So it changes the version used
> on all native bootstraps, what most people use.
So what. The GCC codebase will still need to be valid C++14 and valid C++17
and now also valid C++20 (you can see in the patches I've posted it isn't
anything complicated to make stuff work with C++20, just libcody will be
harder but GCC doesn't otherwise use u8 literals).
> > This is about what C++ standard g++ uses when users don't specify
> > any -std= options.
> > E.g. for C we default to C23, which is 2 years old. For C++ we currently
> > default to C++17, which is 8 years old.
>
> And GNU++20 is only four-and-a-half years old, quite young!
And that is a problem why?
I mean, we've switched to defaulting to C23 a year ago, when it was just a
year old. For a GCC developer the bump will just mean that the sources need
to be also valid C++20 and that bootstrap will point errors in there.
Jakub