From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: Paul Eggert <eggert@cs.ucla.edu>,
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 09:15:58 +0100 [thread overview]
Message-ID: <CAH6eHdRnH0FOmoaptEimQvkUNUBiW_-Qh0UF7fgF-R7EwnbOyw@mail.gmail.com> (raw)
In-Reply-To: <87h6eie9px.fsf@oldenburg.str.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2174 bytes --]
On Tue, 28 May 2024, 07:24 Florian Weimer via Gcc, <gcc@gcc.gnu.org> wrote:
> * Paul Eggert:
>
> > On 2024-05-27 03:35, Florian Weimer wrote:
> >> Does this turn on experimental language modes by default? That's
> >> probably not what we want.
> >
> > What do C++ developers want these days? Autoconf should have a
> > reasonable default, and C++11 is surely not a good default anymore.
>
> It's still a good default for GCC 5.
>
> GCC developers will correct me, but I think the default C++ dialect is
> updated to a newer version once the implementation is reasonably
> complete and bugs have been ironed out.
>
Correct.
Please DO NOT default to C++20 for any current version of GCC, that's an
ABI disaster waiting to happen. There is no version of GCC with stable
C++20 support.
> This is different from the C front end, where it took close to 40 years
> (from the introduction of void * into C) to activate type checking for
> pointer types by default.
>
> >> It would be better to have an option to raise the C++ mode to at least a
> >> certain revision, and otherwise use the default.
> >
> > That option is already available. For example, a builder who doesn't
> > want C++23 can use './configure ac_cv_prog_cxx_cxx23=no', and a
> > developer can discourage C++23 by putting ':
> > ${ac_cv_prog_cxx_cxx23=no}' early in configure.ac.
>
It should not be opt out.
But if you make this change I'll very loudly suggest that everybody use
that in every autoconf-based C++ program. Then you'll probably need some
other solution in 5 years to workaround the fact that that option is
ubiquitous and needs to be ignored or overridden because people want C++20
to be used
> But that is not the same thing. If a project uses C++14 constructs,
> wouldn't it make sense to tell configure to try to get (likely
> experimental) support for it if the compiler does not enable C++14 by
> default? And if the system is already at C++17, leave it at that?
>
> Setting C++14 unconditionally could be incompatible with used system
> libraries, which assume C++17 support because the distribution is aware
> that the system compiler supports C++17.
>
> Thanks,
> Florian
>
>
prev parent reply other threads:[~2024-05-28 8:16 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
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 [this message]
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=CAH6eHdRnH0FOmoaptEimQvkUNUBiW_-Qh0UF7fgF-R7EwnbOyw@mail.gmail.com \
--to=jwakely.gcc@gmail.com \
--cc=autoconf@gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=fweimer@redhat.com \
--cc=gcc@gcc.gnu.org \
--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).