From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id DBCCC3858408 for ; Tue, 28 May 2024 15:02:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DBCCC3858408 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DBCCC3858408 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716908537; cv=none; b=i51N8yerZJskSN0vo9Yf44Uvi53xkHZN0byq34uBQlFkP4v5WrHJHe81/N5HmuJv09/stb8dvqhNUmXjqoGdpW1Ig9UjyKodF0pyMMdJgrHiIV8gznk6P8m7y3eIfRide8i3IpehTwbOAc9pWcKBkbVwsgrt+HTVATkI06QLGz0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716908537; c=relaxed/simple; bh=qC3EWDQzE1zTKXqm5qY0tS8s0yYfT4U6oyybbA5iVaQ=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=ef0Ic9SHtdRq6ej0Cd0dOwcoR6SnYfQZml/uhmEkCRsMmJ1qMkBK+9CIFwI1N2XaQOfCece6zQlqmNrv7tmj/POCcomf4RFBXnK3breNTqIpQ8LB43GI7OXsNnVYmJJ8I81NvhluC5s6JNkDO+BV/X+KlYaDYCsDN/FBTvpmC4A= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716908529; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=p4hlp6l8UKDklFrvNmwkAy63h1suPW/B1DOrpdcRXsI=; b=MLMpxsiQNyQZwH0H6QXCb3WlJK441soosEUy4m9ja7LP5ha7BzQ1Fz7nGjCJEJXQp0aWxC yRoYaHguYw+8CgazQqy+MOoJn9dbQTZOJ4SulRUAFWwnmiQOSRe6+szNXzQl0qrcogZKqr tuiKvgka6H31uepHjaysVU7FMTY/xnE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-150-Q-YLL1dWO0OKnjqOO8HyHg-1; Tue, 28 May 2024 11:02:06 -0400 X-MC-Unique: Q-YLL1dWO0OKnjqOO8HyHg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A249785A58C; Tue, 28 May 2024 15:02:05 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 24358C15BB1; Tue, 28 May 2024 15:02:04 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 44SF23S03367689 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 28 May 2024 17:02:03 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 44SF227D3367688; Tue, 28 May 2024 17:02:02 +0200 Date: Tue, 28 May 2024 17:02:02 +0200 From: Jakub Jelinek To: Paul Eggert Cc: Jonathan Wakely , Florian Weimer , Peter Johansson , Zack Weinberg , Autoconf , "gcc@gcc.gnu.org" Subject: Re: configure adds -std=gnu++11 to CXX variable Message-ID: Reply-To: Jakub Jelinek References: <00dc6e30-2e12-4b29-951b-d600097b38d0@gmail.com> <80bf1a5a-63a3-4da4-8721-88c760243add@cs.ucla.edu> <878qzv1r13.fsf@oldenburg.str.redhat.com> <3e852f76-9508-4c2e-bef3-7af8a10b626e@cs.ucla.edu> <25aee7da-bdd5-4a2a-b6ac-fa1a4aa11cc7@cs.ucla.edu> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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