Re: configure adds -std=gnu++11 to CXX variable

2024-05-29 Thread Jason Merrill via Gcc
On Wed, May 29, 2024 at 1:34 PM Tom Tromey wrote: > > "Jason" == Jason Merrill writes: > > Jason> Thanks, though I don't think all that code needs to go; > Jason> AC_PROG_CXX_STDCXX_EDITION_TRY still looks useful for a project that > Jason> relies on features from a particular standard. We j

Re: configure adds -std=gnu++11 to CXX variable

2024-05-29 Thread Tom Tromey
> "Jason" == Jason Merrill writes: Jason> Thanks, though I don't think all that code needs to go; Jason> AC_PROG_CXX_STDCXX_EDITION_TRY still looks useful for a project that Jason> relies on features from a particular standard. We just don't want Jason> AC_PROG_CXX to invoke it. I didn't re

Re: configure adds -std=gnu++11 to CXX variable

2024-05-28 Thread Paul Eggert
On 5/28/24 11:27, Jason Merrill wrote: AC_PROG_CXX_STDCXX_EDITION_TRY still looks useful for a project that relies on features from a particular standard. It's called "_AC_PROG_CXX_STDCXX_EDITION_TRY" with a leading underscore, which means it's private to Autoconf and apps shouldn't (and I thi

Re: configure adds -std=gnu++11 to CXX variable

2024-05-28 Thread Jason Merrill via Gcc
On Tue, May 28, 2024 at 12:49 PM Paul Eggert wrote: > > On 2024-05-28 08:02, Jakub Jelinek wrote: > > even for C GCC updates the default > > True, but C seems to be different, in that using a later-than-default > -std=whatever is more likely to help than hurt, because the C > standardization folks

Re: configure adds -std=gnu++11 to CXX variable

2024-05-28 Thread Paul Eggert
On 2024-05-28 08:02, Jakub Jelinek wrote: even for C GCC updates the default True, but C seems to be different, in that using a later-than-default -std=whatever is more likely to help than hurt, because the C standardization folks are more careful about compatibility. That's what I've been e

Re: configure adds -std=gnu++11 to CXX variable

2024-05-28 Thread Joseph Myers via Gcc
On Tue, 28 May 2024, Jakub Jelinek via Gcc wrote: > -std=gnu23 support is still incomplete even in GCC 14. It doesn't involve ABI issues, however, unlike C++, so using the option with GCC 14 is comparatively safe. (It might run into a few aliasing bugs related to tag compatibility right now, b

Re: configure adds -std=gnu++11 to CXX variable

2024-05-28 Thread Jason Merrill via Gcc
On Tue, May 28, 2024 at 10:36 AM 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

Re: configure adds -std=gnu++11 to CXX variable

2024-05-28 Thread Jakub Jelinek via Gcc
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-prob

Re: configure adds -std=gnu++11 to CXX variable

2024-05-28 Thread Paul Eggert
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?

Re: configure adds -std=gnu++11 to CXX variable

2024-05-28 Thread Jonathan Wakely via Gcc
On Tue, 28 May 2024, 02:51 Paul Eggert, wrote: > On 2024-05-27 12:18, Jakub Jelinek wrote: > > Maybe respect the carefully chosen compiler default (unless explicitly > > overridden in configure.ac)? > > Autoconf gave up on that idea long ago, as we had bad experiences with > compiler defaults bei

Re: configure adds -std=gnu++11 to CXX variable

2024-05-28 Thread Jonathan Wakely via Gcc
On Tue, 28 May 2024, 07:24 Florian Weimer via Gcc, 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

Re: configure adds -std=gnu++11 to CXX variable

2024-05-27 Thread Florian Weimer via Gcc
* 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. I

Re: configure adds -std=gnu++11 to CXX variable

2024-05-27 Thread Paul Eggert
On 2024-05-27 12:18, Jakub Jelinek wrote: Maybe respect the carefully chosen compiler default (unless explicitly overridden in configure.ac)? Autoconf gave up on that idea long ago, as we had bad experiences with compiler defaults being chosen for the convenience of distro maintainers rather

Re: configure adds -std=gnu++11 to CXX variable

2024-05-27 Thread Jakub Jelinek via Gcc
On Mon, May 27, 2024 at 12:04:40PM -0700, Paul Eggert wrote: > 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, an

Re: configure adds -std=gnu++11 to CXX variable

2024-05-27 Thread 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 would be easy to disco

Re: configure adds -std=gnu++11 to CXX variable

2024-05-27 Thread Florian Weimer via Gcc
* Paul Eggert: > diff --git a/NEWS b/NEWS > index 20dbc173..4ba8f3fe 100644 > --- a/NEWS > +++ b/NEWS > @@ -16,6 +16,10 @@ GNU Autoconf NEWS - User visible changes. >C11 and later. Programs can use AC_C_VARARRAYS and __STDC_NO_VLA__ >to use VLAs if available. > > +*** AC_PROG_CXX now pr