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

2024-05-29 Thread Jason Merrill
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 Joseph Myers
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
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 Jason Merrill
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
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
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
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
* 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
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
* 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

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

2024-05-26 Thread Zack Weinberg
On Sun, May 26, 2024, at 12:31 PM, Paul Eggert wrote: > As Zack mentioned, developers and builders need ways to say things like > "I want C++20 even if the compiler supports C++23". The simplest way to > do that would be to document the existing mechanism, which relies on > setting the appropria

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

2024-05-26 Thread Paul Eggert
Thanks for the patch. I installed something like it (see first attached patch; sorry, I misspelled "C++11" as "C11" in the commit message). This underscores the fact that Autoconf really, really should test for later C++ standards, as documented. I installed the second attached patch to get th

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

2024-05-26 Thread Peter Johansson
Hi Zack, On 5/3/24 00:54, Zack Weinberg wrote: conftest.cpp: In function 'int main(int, char**)': conftest.cpp:199:22: error: invalid conversion from 'const char8_t*' to 'const char*' [-fpermissive] 199 | char const *utf8 = u8"UTF-8 string \u2500"; Fixing these things is a high priority fo

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

2024-03-04 Thread Peter Johansson
Hi Zack, On Tue, Mar 5, 2024 at 12:58 AM Zack Weinberg wrote: > On Mon, Mar 4, 2024, at 9:54 AM, Zack Weinberg wrote: > > Fixing these things is a high priority for Autoconf 2.73 but nobody > > currently has time to work on it. If you have time, we would > > appreciate your working on it -- eve

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

2024-03-04 Thread Zack Weinberg
On Mon, Mar 4, 2024, at 9:54 AM, Zack Weinberg wrote: > Fixing these things is a high priority for Autoconf 2.73 but nobody > currently has time to work on it. If you have time, we would > appreciate your working on it -- even just a rough draft of revised > test programs would be helpful. Oh, al

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

2024-03-04 Thread Zack Weinberg
On Mon, Mar 4, 2024, at 12:17 AM, Peter Johansson wrote: > This is with autoconf 2.72 and GCC 9.4.0. > I try to configure a project with > > ./configure 'CXX=c++ -std=c++2a' > > but the configure seems to dislike that because it outputs > > checking whether the compiler supports GNU C++... yes > ch

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

2024-03-03 Thread Peter Johansson
Hi! This is with autoconf 2.72 and GCC 9.4.0. I try to configure a project with ./configure 'CXX=c++ -std=c++2a' but the configure seems to dislike that because it outputs checking whether the compiler supports GNU C++... yes checking whether c++ -std=c++2a accepts -g... yes checking for c++ -