Message ID | 20231207205625.950093-1-jwakely@redhat.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp5102882vqy; Thu, 7 Dec 2023 14:32:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IFoIM7QQnp3XrtRWv40pHdjG/ygMn4L0NU8gXkF4+XUQpwkpWhst+KJ940cPHH+vWUbl8zr X-Received: by 2002:a05:620a:11bc:b0:77f:2d0b:4dbb with SMTP id c28-20020a05620a11bc00b0077f2d0b4dbbmr2798034qkk.32.1701988323454; Thu, 07 Dec 2023 14:32:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701988323; cv=pass; d=google.com; s=arc-20160816; b=NhEmpLOqedQtxUodHy+u3gr45xiLecoGIDZPPwp9li/4gpoXssP0SJUjVhq+FEG/Wx NsnNBs5tmHqtlhBeZqds2yri6l8wIrRnzZdkD3IeRQqi5XqT38FrkjZrbyoxYoOINr0P ilbU6db4inKkR1NYlfklK9j9RGf0UGKrr3WuQZ0lgku6p8UF5H+9NI+r3HEBYN6fLWlN HW7lYyE6VOLkLVkO/Td1aZ/s7gqF77QJP9ET0GvMflk37N5+HdqUl1Xvd9ouBca0yiqf s/q0YAQcKn/SKQYi+ahBmEsv0fo7Lu2IsetMkA+bUx97A/0qMTpQDPqNVri0wAYvq3v9 YrJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=xV5TsU3c3UvgIWZLfCgVZoliiPQpTvV4+5ps35d45Rc=; fh=sJ+2/4g29YdyXkoRrFZSpsL2zxijepB7X/1rB0LDDh8=; b=TqMDE4LdjNEXcTRHWhsAqPIjs/+vFgtgi2BjcwCxHAQ53ioZ8r2wkLMna7g4lzjzAM MRghBHV0kauvwyQvIoyvOfc5vK2fN+cSmGxarXhamt+Cug2YAAHvdV07bajFmnaE5w8V I/WfJhyA/4V1KxywjMkm2yQUT1Qu6w07WELl1lWYf0MeKkvXtmSxSG2cqASWWlXbcwMF eDzJj5uuqHDrCOSo6mJo5LhGjrU3xer5P623zioRCvOTKq9d722sRDqFCAtCQ3V1afa0 oT982Wwjpe6ewAx7yMlmgtzBT3AlrVG5KusxicdLx52rSJpetBjGvtEk9avzz36eTdjn GiFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aIKBZ5Ie; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id e12-20020ac84b4c000000b0042550022eb6si691833qts.99.2023.12.07.14.32.03 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 14:32:03 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aIKBZ5Ie; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B6E8B385DC35 for <ouuuleilei@gmail.com>; Thu, 7 Dec 2023 20:56:55 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id C918B385803E for <gcc-patches@gcc.gnu.org>; Thu, 7 Dec 2023 20:56:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C918B385803E 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 C918B385803E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701982591; cv=none; b=C6AeRE5SOL36QRwGMYzemy9Ky6yPBw6qSlXwYpVID5Qo602nirBBW6rpUT1mD9wrr4dkOaKNHQxpp8YaZp9sLTqe/DATcZX8weBVX+n6wwrIB0Etk3z41hl+Ww6oz4gmkA3oYmMT988HYUIrmt6JtIfku6TybTHccVnQQ0xxk/M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701982591; c=relaxed/simple; bh=Jy34Xv3Pbolgep97/HS1F7K0Mn4okE/xboGpcJvEjYw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=tbmZj0eOWQ2PLCjuC8KMdv5S3GhA1z/LjtexCzTYD8HwIW5jWC042m0kF2Aj7eAMW1VFMyDSbfmJFtE26gshLwC/kbGgvDpaKjpb2d4uj2UTY67ba7qmdQAwBwKepAcqFTWAG1OcdEFE6BVxHW7CpBINias0m94khbgDZpVcnAY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701982589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xV5TsU3c3UvgIWZLfCgVZoliiPQpTvV4+5ps35d45Rc=; b=aIKBZ5IehvaVN2kk2xhjBxYalXjfKPHVTzDTt9iDVdM083thxDDUTWA3qyXtK1kn8SPQ7o MyeRcMIRCQirr9+2GeYsmJWgAbJWethucsdyQIeALPxGGu5Qtwd/hyLzfXOcZafoG2PmMq g3WJe6+Vj/IO2vq72I5FsnNVyt5kTX4= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-97-hoTaeDXGNbuumdEUqiyS_Q-1; Thu, 07 Dec 2023 15:56:26 -0500 X-MC-Unique: hoTaeDXGNbuumdEUqiyS_Q-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (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 0719329AC006; Thu, 7 Dec 2023 20:56:26 +0000 (UTC) Received: from localhost (unknown [10.42.28.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id C80238CD0; Thu, 7 Dec 2023 20:56:25 +0000 (UTC) From: Jonathan Wakely <jwakely@redhat.com> To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Use <cstdint> instead of <stdint.h> in <bits/atomic_wait.h> Date: Thu, 7 Dec 2023 20:56:00 +0000 Message-ID: <20231207205625.950093-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784664108348494036 X-GMAIL-MSGID: 1784664108348494036 |
Series |
[committed] libstdc++: Use <cstdint> instead of <stdint.h> in <bits/atomic_wait.h>
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Jonathan Wakely
Dec. 7, 2023, 8:56 p.m. UTC
Tested x86_64-linux. Pushed to trunk. I'll backport this too. -- >8 -- In r14-5922-g6c8f2d3a08bc01 I added <stdint.h> to <bits/atomic_wait.h>, so that uintptr_t is declared if that header is compiled as a header unit. I used <stdint.h> because that's what <atomic> already includes, so it seemed simpler to be consistent. However, this means that name lookup for uintptr_t in <bits/atomic_wait.h> depends on whether <cstdint> has been included by another header first. Whether name lookup finds std::uintptr_t or ::uintptr_t will depend on include order. This causes problems when compiling modules with Clang: bits/atomic_wait.h:251:7: error: 'std::__detail::__waiter_pool_base' has different definitions in different modules; first difference is defined here found method '_S_for' with body _S_for(const void* __addr) noexcept ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bits/atomic_wait.h:251:7: note: but in 'tm.<global>' found method '_S_for' with different body _S_for(const void* __addr) noexcept ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ By including <cstdint> we would ensure that name lookup always finds the name in namespace std. Alternatively, we can stop including <stdint.h> for those types, so that we don't declare the entire contents of <stdint.h> when we only need a couple of types from it. This patch does the former, which is appropriate for backporting. libstdc++-v3/ChangeLog: * include/bits/atomic_wait.h: Include <cstdint> instead of <stdint.h>. --- libstdc++-v3/include/bits/atomic_wait.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/bits/atomic_wait.h b/libstdc++-v3/include/bits/atomic_wait.h index 1460b1d8d5c..8e01a9c518d 100644 --- a/libstdc++-v3/include/bits/atomic_wait.h +++ b/libstdc++-v3/include/bits/atomic_wait.h @@ -35,7 +35,7 @@ #include <bits/version.h> #if __glibcxx_atomic_wait -#include <stdint.h> +#include <cstdint> #include <bits/functional_hash.h> #include <bits/gthr.h> #include <ext/numeric_traits.h>