DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 49V5fARI3613062
Authentication-Results: delorie.com;
	dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=yzBk8BlH
X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C1EAC3857C47
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1730353268;
	bh=4iibmtDpVVbKojFD7sBblt6Ty6l7HRHL70K9yKyW5fs=;
	h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
	 From;
	b=yzBk8BlHOG1E2ETeaHpEwdIlnJjfJPtyoD6I0EqvuD7RYlhOoT/kUDymT8aoS0DL8
	 NK0C9aAvPCMIdvYbrvN6NE/1EIPv283EVfu2l2Z0bkegvFLcTKMEzswVIbop9In2RY
	 /I1vFqyy0MkXeaOCLFKXeiYYG+H7Ks8s3ZqkcIEs=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1082F3858D21
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1082F3858D21
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730353246; cv=none;
 b=IZZAkZI7/eN5PaPSIliqk9+eiFw25CBQ6m7DqRcDQXAMyEv54fFxdgrMRwIsTuC8864YGKzABqPImOkKXBRvv4VkW9rpmSzt12BbYAm5BobnLBTYEJe+Rrbmr8YDlIm15maC/WAidiobW9N8K9EiLNsGipuflf4XdyLGNQSYbco=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
 t=1730353246; c=relaxed/simple;
 bh=3jBLGz9xLBdw8k5FOou0OufW0086PxE4XDfR3CO2IfE=;
 h=Message-ID:Date:MIME-Version:Subject:To:From;
 b=ICFZsNvMr48HkJ2vTee3e5HmQLE2v9uxwBUf225BX+j/SRBXgoOCmAfuJ7F1tVAV7hr9b6b5YxZAjIsl33dmEyi6WukAskJT0k/IqQZO6YQk5ZgfcJhkXZQi+Q5NgaTBSduBPbxd3bv5nHYPpLhpigWUTwtXAk4Hb0ZDn3iycFw=
ARC-Authentication-Results: i=1; server2.sourceware.org
Message-ID: <575d416a-7ee0-4e85-82f2-d97b4cd511da@SystematicSW.ab.ca>
Date: Wed, 30 Oct 2024 23:40:41 -0600
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: g++ 12 -std=gnu++20
Content-Language: en-CA
To: cygwin@cygwin.com
References: <48e51b50-63db-4b14-b321-46942e40862e@SystematicSW.ab.ca>
 <3805509C-51BA-46F9-95A3-007CE99B014A@unified-streaming.com>
 <764d17ab-a660-4e89-8fd3-175e93f11507@gmail.com>
 <B7BA05FB-75CE-48DE-92ED-267540E59FD0@unified-streaming.com>
Organization: Systematic Software
In-Reply-To: <B7BA05FB-75CE-48DE-92ED-267540E59FD0@unified-streaming.com>
X-Rspamd-Queue-Id: 96C4220027
X-Stat-Signature: ts4nkhh8yd3qpxx6a7kgz65x53jkq4pq
X-Rspamd-Server: rspamout06
X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361
X-Session-ID: U2FsdGVkX18C6s2+StrZuAYp93YhY0GDuUQ+tx1E0/Y=
X-HE-Tag: 1730353230-164976
X-HE-Meta: U2FsdGVkX1+kIX0mFgLP6fw8w9jJCqp1dCCUbOSAn4dghIa1AfISHEKYyuO+KZw7ElWrq3xS0VBkTqUT6yWyBNcs2udn725VYMteZ4MWTpLBBLhO8GNtscjnLYfssR8JcnVowL5jq7BG+W8Rjvc9Tz/JYFllHMEPL21dGPYiCt6AgSaoLDIILhHTg0Y3BSnRfQbzzaZdsUYUia/ire/mhFXPygfmB+UmEYytkjU3AGOp6FYmGaIfx5c1s526RVPSNwbzLwc1HFFCgrXefSi5qNlZb93fZsti+ptCiq9DYMjFI68+kWN0KzGQlyU+HBY3RbSM9aK95uypgzew/SFQ5Ei0GGSP9RlV
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Brian Inglis via Cygwin <cygwin@cygwin.com>
Reply-To: cygwin@cygwin.com
Cc: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Errors-To: cygwin-bounces~archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie.com@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 49V5fARI3613062

On 2024-10-30 10:30, Dimitry Andric via Cygwin wrote:
> On 30 Oct 2024, at 17:14, Csaba Ráduly via Cygwin wrote:
>> On 30/10/2024 17:00, Dimitry Andric via Cygwin wrote:
>>> #include<string>
>>> #include<cassert>
>>>
>>> constexpr bool foo()
>>> {
>>>    std::string str2{"abcwe"};
>>>    return str2.size()==5;
>>> }
>>>
>>> static_assert(foo());
>>>
>>> int main()
>>> {
>>>    assert(foo());
>>> }
>>
>> Seems like _GLIBCXX_USE_CXX11_ABI is not defined by default.
> 
> Indeed, /usr/lib/gcc/x86_64-pc-cygwin/12/include/c++/x86_64-pc-cygwin/bits/c++config.h shows:
> 
>     317  # define _GLIBCXX_USE_DUAL_ABI 1
>     318
>     319  #if ! _GLIBCXX_USE_DUAL_ABI
>     320  // Ignore any pre-defined value of _GLIBCXX_USE_CXX11_ABI
>     321  # undef _GLIBCXX_USE_CXX11_ABI
>     322  #endif
>     323
>     324  #ifndef _GLIBCXX_USE_CXX11_ABI
>     325  # define _GLIBCXX_USE_CXX11_ABI 0
>     326  #endif
>   
> Also, g++ -v shows --with-default-libstdcxx-abi=gcc4-compatible, so I guess this was deliberate on the part of the packagers. Probably for backwards compatibility reasons?

Okay, sorry, I typoed an extra _ before _GLIBCXX_NOEXCEPT!

Cygwin gcc/g++ 13.3 is available as a test package; only with .4/.5 are gcc 
version features and fixes considered stable.

The build is requesting -std=gnu++20, so why is 11 ABI relevant?

As I want to use the latest language, why is gcc 4 compatible ABI *default* 
relevant?

What can I do in the package build to get g++ to not use the default but 
whatever is required to support the latest language?

Where can I find docs on these symbols and their meanings, uses, and settings?

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

