delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/10/30/12:31:28

DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 49UGVRRg3324892
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=CtRKeQ9K
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E16CC3857C5D
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1730305886;
bh=phiXZ5uP7EcEfopAZGzfpjmrgt8+W7n3oBv/8epIu9I=;
h=Subject:In-Reply-To:Date:Cc:References:To:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
From:Reply-To:From;
b=CtRKeQ9K6bcUeDB2t/OhglOb6ojrhU1wWp4TySHA/X36MMZy30iBW1sthpRcUgbG+
riTfu527fogVz9DAjy95VgMPsRIGnvBPGZ1SyWE6MUuYmEsLToRBNYuuXmdLqK3I9s
y9TBPa7YurqsYrxVotTESn+bmVNyt2aix1E9RvkA=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AF9A33858D28
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AF9A33858D28
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730305827; cv=none;
b=v86sdwU8RhwJxsB8MBitoZO2cRI55juU0jGkjyWCV8FbYJ4SXg0zCt6bKuUPxfEE5f02VgFeuRevCKZbyods5YWntIu5wXUOfuOcdOwHzlM781VjEyxOfa20N6dTYRnqGwshzUn+cIrh//nNEE5B27Tf0iOEkVGjs/5xFCwOG38=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1730305827; c=relaxed/simple;
bh=T/DPZLfHa8mkdl4eZOFfg0RAsoocagea7PWeaFnEWgo=;
h=DKIM-Signature:Mime-Version:Subject:From:Date:Message-Id:To;
b=q2cOohQEoUA2Xz7v8vJMsKC6wsc7SFzO5We6VV9ujQuS1bnnm6b+4mY3zHTJmB2Sd9GL6GYOcow+5ry1Oz2xYMdIsQlD3TwwG/utxjODAmDgSnBwc1rW3Pcl/HErbksOBX/J3m889+fRVHodidCSCXcXxJNlcaA+oIxet3J2wDQ=
ARC-Authentication-Results: i=1; server2.sourceware.org
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1730305815; x=1730910615;
h=to:references:message-id:content-transfer-encoding:cc:date
:in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=6s67kmAhSHstFNW+xoRKHx3sAggOzctVGeT1Rs3nlCA=;
b=HwaXUjKxRz3ISPm5DUt4/LGCCicmcZCJd3bRHExXZl7cO3adXlnF33IWrxH80AcyUj
4fjR5yTGel+7X14AnvGvFvGdDsTvctmh4eXyRh9Z8u2rSEx5LaqGbQL68Ocl6WOs7Ns/
9+SFZ9JNWiDMgBwaLBGTSEpipLJvLQ2vowRIBM9mrPOks2Mj+UswmieXSKgbfLCyAlgm
30JG2dU16dlhtRNrz2pIAN8VQKAEjEsaTrDbV5wSiNNWkY89U3dNO43rY9+o0JtWA+0e
YT5ezmQ0l9q7bpVJXCTiLOcaDdsbRMq4x3ELpPkgdD+w/FJLll/kGzxU+o68FVKS16x8
7qVw==
X-Gm-Message-State: AOJu0YwPz52GbL8Jknr6Eit4a+veeMBNElaCnOXqEVZQqZ3CBYdQg0Hg
7k2MT2VYPd74XLY7Q3QM/ZdopJPELvsN+ZmX+NZbcLZtSGuplH2F6jDIFNN+lTA=
X-Google-Smtp-Source: AGHT+IFiPBoDWSUlh0em3QaN4d/edU6Tz7P2Wgmcd42xSpCHNvSWqoWv/34J9nbUonjKOF+Bu8r97Q==
X-Received: by 2002:a17:907:e87:b0:a9a:c61b:1307 with SMTP id
a640c23a62f3a-a9e5092d469mr7112866b.31.1730305815331;
Wed, 30 Oct 2024 09:30:15 -0700 (PDT)
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.9\))
Subject: Re: g++ 12 -std=gnu++20
In-Reply-To: <764d17ab-a660-4e89-8fd3-175e93f11507@gmail.com>
Date: Wed, 30 Oct 2024 17:30:14 +0100
Cc: cygwin AT cygwin DOT com
Message-Id: <B7BA05FB-75CE-48DE-92ED-267540E59FD0@unified-streaming.com>
References: <48e51b50-63db-4b14-b321-46942e40862e AT SystematicSW DOT ab DOT ca>
<3805509C-51BA-46F9-95A3-007CE99B014A AT unified-streaming DOT com>
<764d17ab-a660-4e89-8fd3-175e93f11507 AT gmail DOT com>
To: =?utf-8?Q?Csaba_R=C3=A1duly?= <rcsaba AT gmail DOT com>
X-Mailer: Apple Mail (2.3731.700.6.1.9)
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Dimitry Andric via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Dimitry Andric <dimitry AT unified-streaming DOT com>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 49UGVRRg3324892

On 30 Oct 2024, at 17:14, Csaba Ráduly via Cygwin <cygwin AT cygwin DOT com> 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?

-Dimitry


-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019