From: Jakub Jelinek <jakub@redhat.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Jonathan Wakely <jwakely.gcc@gmail.com>,
Florian Weimer <fweimer@redhat.com>,
Peter Johansson <trojkan@gmail.com>,
Zack Weinberg <zack@owlfolio.org>, Autoconf <autoconf@gnu.org>,
"gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: configure adds -std=gnu++11 to CXX variable
Date: Tue, 28 May 2024 17:02:02 +0200 [thread overview]
Message-ID: <ZlXx6u7etcenKJD9@tucnak> (raw)
In-Reply-To: <f36179bc-7d78-4e93-9407-41f74a14eca7@cs.ucla.edu>
On Tue, May 28, 2024 at 07:35:43AM -0700, Paul Eggert wrote:
> On 2024-05-28 01:20, Jonathan Wakely wrote:
> > I am not aware of any distro ever changing the default -std setting for g++
> > or clang++. Are you attempting to solve a non-problem, but introducing new
> > ones?
>
> If it's a non-problem for C++, why does Autoconf upgrade to C++11 when the
> default is C++98? Autoconf has done so since Autoconf 2.70 (2020), with
> nobody complaining as far as I know.
>
> Was the Autoconf 2.70 change done so late that it had no practical effect,
> because no distro was defaulting to C++98 any more? If so, it sounds like
That seems to be the case.
Dunno about clang++ defaults, but GCC defaults to
-std=gnu++98 (before GCC 6), or
-std=gnu++14 starting with GCC 6 (April 2016), or
-std=gnu++17 starting with GCC 11 (April 2021).
So, if autoconf in 2020 c++98 default to c++11, bet it didn't affect almost
anything. RHEL 7 uses GCC 4.8, which partially but not fully supports c++11
(e.g. GCC which is written in C++11 these days can build using GCC 4.8.5
as oldest compiler, has to use some workarounds because the C++11 support
isn't finished there, the library side even further from that). And trying
to enable C++11 on GCC 4.4 (RHEL 6) wouldn't be a good idea, too much was
missing there.
With C++20 in GCC 14, from core most of the features are in except that
modules still need further work, for library side at least cppreference
says it is complete too but I think the ABI hasn't been declared stable yet,
so C++17 is still the default, dunno if it will change in GCC 15 or not.
> Autoconf should go back to its 2.69 behavior and not mess with the C++
> version as that's more likely to hurt than help.
Yes.
> For background on that Autoconf 2.70 change, see this 2013 thread:
>
> https://lists.gnu.org/r/autoconf/2013-01/msg00016.html
From what I can see, the change was proposed when the C++11 support wasn't
complete and didn't expect compilers will actually change their defaults
when the support is sufficiently stable.
Note, even for C GCC updates the default, -std=gnu99 default was changed to
-std=gnu11 in GCC 5 (April 2015) and -std=gnu17 in GCC 8 (May 2018).
-std=gnu23 support is still incomplete even in GCC 14.
Jakub
next prev parent reply other threads:[~2024-05-28 15:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAEZXgxjf7fQNHvkA09ia8ivHEsOHVKhzvoqdq=TCNRfdFTJryA@mail.gmail.com>
[not found] ` <aece3efd-503b-4106-99ad-e66be8b0b684@app.fastmail.com>
[not found] ` <00dc6e30-2e12-4b29-951b-d600097b38d0@gmail.com>
[not found] ` <80bf1a5a-63a3-4da4-8721-88c760243add@cs.ucla.edu>
2024-05-27 10:35 ` Florian Weimer
2024-05-27 19:04 ` Paul Eggert
2024-05-27 19:18 ` Jakub Jelinek
2024-05-28 1:50 ` Paul Eggert
2024-05-28 8:20 ` Jonathan Wakely
2024-05-28 14:35 ` Paul Eggert
2024-05-28 15:01 ` Jason Merrill
2024-05-28 15:02 ` Jakub Jelinek [this message]
2024-05-28 16:44 ` Joseph Myers
2024-05-28 16:45 ` Paul Eggert
2024-05-28 18:27 ` Jason Merrill
2024-05-28 20:09 ` Paul Eggert
2024-05-29 17:33 ` Tom Tromey
2024-05-29 17:40 ` Jason Merrill
2024-05-28 6:23 ` Florian Weimer
2024-05-28 8:15 ` Jonathan Wakely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZlXx6u7etcenKJD9@tucnak \
--to=jakub@redhat.com \
--cc=autoconf@gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=fweimer@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=jwakely.gcc@gmail.com \
--cc=trojkan@gmail.com \
--cc=zack@owlfolio.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).