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.129.124]) by sourceware.org (Postfix) with ESMTPS id A8846380FACA for ; Fri, 9 Dec 2022 00:36:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A8846380FACA 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=1670546178; 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=UEQc1HLtwAiBvdpgO31fhk7626Bs9Zl9V/1Wf6kmGHw=; b=gUkEq721P0qwpA/Qvx5zyLOvGmQ50nYDpi4//E+ztqfLl+BFTUCQkmXgGFRS4ZysMGR4Zu v/7HOQg4Ve5bDJNveRiQgHD8VpLjB7/vigtxV2XZK66FyzHiEdrWIYI6lIGbISb5Msv22H wL5rF3DhK5JqmzCriAJlxt+mM9+xlSY= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-207-sbEy-vDYNu6h8ahjPkv99g-1; Thu, 08 Dec 2022 19:36:15 -0500 X-MC-Unique: sbEy-vDYNu6h8ahjPkv99g-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D88733C0DDCB; Fri, 9 Dec 2022 00:36:14 +0000 (UTC) Received: from localhost (unknown [10.33.36.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id 871391121331; Fri, 9 Dec 2022 00:36:14 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Fix some -Wunused warnings in tests Date: Fri, 9 Dec 2022 00:36:11 +0000 Message-Id: <20221209003611.443110-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.2 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_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: Tested x86_64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/ext/pb_ds/detail/type_utils.hpp (PB_DS_STATIC_ASSERT): Add unused attribute to avoid -Wunused-local-typedef warnings. * testsuite/17_intro/tag_type_explicit_ctor.cc: Add pragma to ignore -Wunused-variable warnings --- libstdc++-v3/include/ext/pb_ds/detail/type_utils.hpp | 3 ++- libstdc++-v3/testsuite/17_intro/tag_type_explicit_ctor.cc | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/ext/pb_ds/detail/type_utils.hpp b/libstdc++-v3/include/ext/pb_ds/detail/type_utils.hpp index 52d05392975..c3db6c93ea6 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/type_utils.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/type_utils.hpp @@ -152,7 +152,8 @@ namespace __gnu_pbds }; #define PB_DS_STATIC_ASSERT(UNIQUE, E) \ - typedef __gnu_pbds::detail::__static_assert_dumclass)> UNIQUE##__static_assert_type + typedef __gnu_pbds::detail::__static_assert_dumclass)> \ + UNIQUE##__static_assert_type __attribute__((__unused__)) #endif diff --git a/libstdc++-v3/testsuite/17_intro/tag_type_explicit_ctor.cc b/libstdc++-v3/testsuite/17_intro/tag_type_explicit_ctor.cc index 410142d3974..fead30f63c3 100644 --- a/libstdc++-v3/testsuite/17_intro/tag_type_explicit_ctor.cc +++ b/libstdc++-v3/testsuite/17_intro/tag_type_explicit_ctor.cc @@ -34,6 +34,8 @@ void f5(std::try_to_lock_t); void f6(std::adopt_lock_t); #endif +#pragma GCC diagnostic ignored "-Wunused-variable" + int main() { std::nothrow_t v1; -- 2.38.1