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 631B6385615B for ; Thu, 20 Oct 2022 13:08:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 631B6385615B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666271311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YiQSl0hgXjEfYklVQBzHDnCbkY2aqQHKUZeWiR6vyrU=; b=ATUfL8U+gXS7FwLHPn79I+51U5YktcbzaF0GGLRIk2eMj2mTsHCYMM5CYCmXjK3unHCPVL +tpfKtc7FzsddGh/2BiQzwRM67mfYIrNEsVK2DoL3DGshXAO2/szlhnB339ly0JG5H2ccP 05Y//KQtnndLYQqNBCUq48xL6SXkP84= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-594-F5SbJyveNout0zlcJn_Vuw-1; Thu, 20 Oct 2022 09:08:28 -0400 X-MC-Unique: F5SbJyveNout0zlcJn_Vuw-1 Received: by mail-qt1-f200.google.com with SMTP id n11-20020ac8674b000000b0039c9e248175so15056520qtp.14 for ; Thu, 20 Oct 2022 06:08:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YiQSl0hgXjEfYklVQBzHDnCbkY2aqQHKUZeWiR6vyrU=; b=yrLcsZ4DJntOK3AsCjfpl2cGUcIC9e0hSAyvS2GaKdv0G4Aly38kLUQrZO2/F4VzEl z8M4Xgx23hohGcHpeGH72Btg08L5E2Xk1oQKjqd81HQUu1I0LQ1m/mMcNaqdxbdoXRxQ SHx4T6pqnf5W9SBOQnKFPdjNDmJK4qlSoNBWlqt8aTmLzdkb9v7dgp4LA/BSkcMMR0mj nkZ12r7nwE8xuoexPPffuRjViiLnxR07dI4iFNSpJ24S9WWhdbSihrmK2HNXCQS0JvrS THHk0bJbfOq/Bss/qWFijflRUINw32Ia1RrEf9qtRWwzvABqoBAirGX67zt71GUmqO13 S/6w== X-Gm-Message-State: ACrzQf2uJE1D6TXXNrQyAs5ZiQn1gbwpgul0/R+yE7lOKLhfndGyxZWp SYX+XOc8K7SGvIstDwfyFhDU65z3Re7eNF6N/G/bdV8NBh5NMHCUlAgJ0NnXfGEv6hJgCS8E+tt na7ifD99xPhleGJCLOaX+/4EUls3vqyY= X-Received: by 2002:a0c:9a0d:0:b0:4b1:982e:96d4 with SMTP id p13-20020a0c9a0d000000b004b1982e96d4mr10821569qvd.114.1666271307681; Thu, 20 Oct 2022 06:08:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7XcGPUZ9RhX/y2LpOLzhc9wDC4jP6LXOFZ8kRBHnvnsq52AG+Q7pL/acrmxlk8a61KDXj8e3OMFF2UeEKdlyE= X-Received: by 2002:a0c:9a0d:0:b0:4b1:982e:96d4 with SMTP id p13-20020a0c9a0d000000b004b1982e96d4mr10821549qvd.114.1666271307438; Thu, 20 Oct 2022 06:08:27 -0700 (PDT) MIME-Version: 1.0 References: <20221020125615.2198195-1-arsen@aarsen.me> In-Reply-To: <20221020125615.2198195-1-arsen@aarsen.me> From: Jonathan Wakely Date: Thu, 20 Oct 2022 14:08:16 +0100 Message-ID: Subject: Re: [PATCH] libstdc++: Don't use gstdint.h anymore To: =?UTF-8?Q?Arsen_Arsenovi=C4=87?= Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=unavailable 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 Thu, 20 Oct 2022 at 13:58, Arsen Arsenovi=C4=87 via Libstdc++ wrote: > > libstdc++-v3/ChangeLog: > > * configure.ac: Stop generating gstdint.h. > * src/c++11/compatibility-atomic-c++0x.cc: Stop using gstdint.h. > --- > Tested on x86_64-pc-linux-gnu. > > libstdc++-v3/configure.ac | 6 ------ > libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc | 9 +++++---- > 2 files changed, 5 insertions(+), 10 deletions(-) > > diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac > index 81d914b434a..c5ec976c026 100644 > --- a/libstdc++-v3/configure.ac > +++ b/libstdc++-v3/configure.ac > @@ -440,12 +440,6 @@ GCC_CHECK_UNWIND_GETIPINFO > > GCC_LINUX_FUTEX([AC_DEFINE(HAVE_LINUX_FUTEX, 1, [Define if futex syscall= is available.])]) > > -if test "$is_hosted" =3D yes; then > -# TODO: remove this and change src/c++11/compatibility-atomic-c++0x.cc t= o > -# use instead of . > -GCC_HEADER_STDINT(include/gstdint.h) > -fi > - Yes, I said in r12-6409-g68c2e9e9234cb3 that removing that could wait for stage 1, so let's do it now. > GLIBCXX_ENABLE_SYMVERS([yes]) > AC_SUBST(libtool_VERSION) > > diff --git a/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc b/libst= dc++-v3/src/c++11/compatibility-atomic-c++0x.cc > index 5a0c5459088..2065eb517db 100644 > --- a/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc > +++ b/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc > @@ -22,10 +22,11 @@ > // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see > // . > > -#include "gstdint.h" > #include > #include > > +using guintptr_t =3D __UINTPTR_TYPE__; I think this should be local in the only function that uses it. > + > // XXX GLIBCXX_ABI Deprecated > // gcc-4.7.0 > > @@ -119,13 +120,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > _GLIBCXX_CONST __atomic_flag_base* > __atomic_flag_for_address(const volatile void* __z) _GLIBCXX_NOTHROW > { > - uintptr_t __u =3D reinterpret_cast(__z); > + guintptr_t __u =3D reinterpret_cast(__z); > __u +=3D (__u >> 2) + (__u << 4); > __u +=3D (__u >> 7) + (__u << 5); > __u +=3D (__u >> 17) + (__u << 13); > - if (sizeof(uintptr_t) > 4) > + if (sizeof(guintptr_t) > 4) > __u +=3D (__u >> 31); > - __u &=3D ~((~uintptr_t(0)) << LOGSIZE); > + __u &=3D ~((~guintptr_t(0)) << LOGSIZE); > return flag_table + __u; > } > > -- > 2.38.1 >