From patchwork Thu Oct 3 11:30:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1992313 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=c7VJG/Ji; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XK8fP6RV0z1xt1 for ; Thu, 3 Oct 2024 21:32:13 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B9A90384A837 for ; Thu, 3 Oct 2024 11:32:11 +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.133.124]) by sourceware.org (Postfix) with ESMTP id 5FAD5384BC07 for ; Thu, 3 Oct 2024 11:31:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5FAD5384BC07 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 5FAD5384BC07 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=1727955064; cv=none; b=UaLTsEB6Gx3xYkPXfyND+kZmO+mnHdw69HEgxAqLsjfiqj88nI1JmKNt0QBTScF/ppsNmvVYF8x3Z/DExOw5qdBN9QkLoaGnQHTz6MvnlR3Orz6xpSdW5uyHtlPsBi1RxmPUQw2KQY9Lt39emv3qplCOpnE5f9gJlZP7iWEcxMk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727955064; c=relaxed/simple; bh=Si0srG91I71BF+4oHFlS3H3cr2CW0l73+YDtEoKVBcg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=tzXog5gh4vDofHLhAWgymR+Ao0A8EuIOQJK6E8XJratMvyxgBlHDh19lDy3Ir5pKaYnsqOyCGU4gQ3VVdcm3p9AEc7Ke1J3ZGT5oa/R2bA2C9gqZT09AOzf+mMQHTzONUufRDuG7XVJ90XhZKulKHZaAUuhV6MB+5cOGzqgFGzM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727955063; 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=LUQS5T5EUqRqC429kTPdMSTFntARz1lqJiolrcTR8i4=; b=c7VJG/JiVCGbKm11o6apy3bVJE0Jrg1c/QBdVSoHvWJD6ps9UDM7IfiC3KzKcG71LWHh8G nGD4/WMTnjOyRdSH4Q+H++kWltpOA2OoJj6ozhEJ4ztFkZUcUQVAjZZBhmH/EKtUZj1+2U gKMXKguwcqhQ+j+4RTH7oNfeaoStlbY= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-260-grVnBW_yNl2vRw3l-0gWHw-1; Thu, 03 Oct 2024 07:30:59 -0400 X-MC-Unique: grVnBW_yNl2vRw3l-0gWHw-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9758C1955DDC; Thu, 3 Oct 2024 11:30:58 +0000 (UTC) Received: from localhost (unknown [10.42.28.136]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1338419560A3; Thu, 3 Oct 2024 11:30:57 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Fix -Wdeprecated-declarations warning for Parallel Mode [PR116944] Date: Thu, 3 Oct 2024 12:30:50 +0100 Message-ID: <20241003113056.3523574-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.0 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_H3, RCVD_IN_MSPIKE_WL, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Tested x86_64-linux. Pushed to trunk. -- >8 -- The pragmas to disable warnings need to be moved before the first use of the deprecated classes. libstdc++-v3/ChangeLog: PR libstdc++/116944 * include/parallel/base.h: Move diagnostic pragmas earlier. --- libstdc++-v3/include/parallel/base.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/include/parallel/base.h b/libstdc++-v3/include/parallel/base.h index fcbcc1e0b99..4341e26baf0 100644 --- a/libstdc++-v3/include/parallel/base.h +++ b/libstdc++-v3/include/parallel/base.h @@ -150,6 +150,9 @@ namespace __gnu_parallel max(const _Tp& __a, const _Tp& __b) { return (__a > __b) ? __a : __b; } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // *nary_function + /** @brief Constructs predicate for equality from strict weak * ordering predicate */ @@ -166,9 +169,6 @@ namespace __gnu_parallel { return !_M_comp(__a, __b) && !_M_comp(__b, __a); } }; -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // *nary_function - /** @brief Similar to std::unary_negate, * but giving the argument types explicitly. */ template