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 9839D385773F for ; Mon, 4 Sep 2023 16:29:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9839D385773F 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=1693844975; 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=Es8RZJ4RjA+WiKTL44IIb0fy+ip1R6z5y55NqKAArEg=; b=Kv+ic7EIwVevchfqXmt58auB6EHxO0qTTlP05xyxqI9SYq9BD09NRxx2QxJ3ahDMMgRblU FRPttuhImRSPwe53QRqwZFIQQQYJQjkVPvCqd0/MtG2upGKevrz8xEpgYqQHrJHgyfsP0v CyjLsqgX86CSiCuEN22DyCbR52TKGHY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-74-ynABM9m5NwC1vzg03dhjTw-1; Mon, 04 Sep 2023 12:29:32 -0400 X-MC-Unique: ynABM9m5NwC1vzg03dhjTw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F3D468008A4; Mon, 4 Sep 2023 16:29:31 +0000 (UTC) Received: from localhost (unknown [10.42.28.200]) by smtp.corp.redhat.com (Postfix) with ESMTP id BC102493114; Mon, 4 Sep 2023 16:29:31 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Remove dg-options "-std=c++98" from TR1 tests Date: Mon, 4 Sep 2023 17:29:27 +0100 Message-ID: <20230904162931.515957-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.8 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_H4,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 List-Id: Tested x86_64-linux. Pushed to trunk. -- >8 -- These tests need slight adjustments to be valid in C++11 and later, but there's no reason that can't be done, so that we test them in more modes. libstdc++-v3/ChangeLog: * testsuite/tr1/6_containers/utility/pair.cc: Remove dg-options and qualify ambiguous calls to get. * testsuite/tr1/8_c_compatibility/cmath/pow_cmath.cc: Adjust expected result for std::pow(float, int) as per DR 550. --- .../tr1/6_containers/utility/pair.cc | 19 ++++++++----------- .../tr1/8_c_compatibility/cmath/pow_cmath.cc | 7 +++++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/libstdc++-v3/testsuite/tr1/6_containers/utility/pair.cc b/libstdc++-v3/testsuite/tr1/6_containers/utility/pair.cc index 4d4dcdb7a02..904b38c2b64 100644 --- a/libstdc++-v3/testsuite/tr1/6_containers/utility/pair.cc +++ b/libstdc++-v3/testsuite/tr1/6_containers/utility/pair.cc @@ -17,8 +17,6 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=c++98" } - // tr1 additions to pair #include @@ -42,15 +40,14 @@ main() tuple_element<1, pair >::type blank3 __attribute__((unused)) = blank; pair test_pair(1, 2); - VERIFY(get<0>(test_pair) == 1); - VERIFY(get<1>(test_pair) == 2); - get<0>(test_pair) = 3; - get<1>(test_pair) = 4; - VERIFY(get<0>(test_pair) == 3); - VERIFY(get<1>(test_pair) == 4); + VERIFY(std::tr1::get<0>(test_pair) == 1); + VERIFY(std::tr1::get<1>(test_pair) == 2); + std::tr1::get<0>(test_pair) = 3; + std::tr1::get<1>(test_pair) = 4; + VERIFY(std::tr1::get<0>(test_pair) == 3); + VERIFY(std::tr1::get<1>(test_pair) == 4); const pair test_pair2(1,2); - VERIFY(get<0>(test_pair2) == 1); - VERIFY(get<1>(test_pair2) == 2); + VERIFY(std::tr1::get<0>(test_pair2) == 1); + VERIFY(std::tr1::get<1>(test_pair2) == 2); } - diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/pow_cmath.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/pow_cmath.cc index bc89ab2f6fe..63891bf4ba0 100644 --- a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/pow_cmath.cc +++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/pow_cmath.cc @@ -17,8 +17,6 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=c++98" } - #include using std::pow; #include @@ -30,6 +28,11 @@ test01() using namespace __gnu_test; float x = 2080703.375F; +#if __cplusplus < 201103L check_ret_type(std::pow(x, 2)); +#else + // LWG 550 What should the return type of pow(float,int) be? + check_ret_type(std::pow(x, 2)); +#endif check_ret_type(std::tr1::pow(x, 2)); } -- 2.41.0