From patchwork Fri Oct 18 12:02:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1999086 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=G4+c6J63; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; 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 [8.43.85.97]) (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 4XVNfS32Cqz1xw2 for ; Fri, 18 Oct 2024 23:04:16 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 882523858288 for ; Fri, 18 Oct 2024 12:04:14 +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 78E903858433 for ; Fri, 18 Oct 2024 12:03:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 78E903858433 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 78E903858433 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=1729253016; cv=none; b=jzZ/3LgJZinhTz+aNEpet03Xn5AjOgO18211FHKZMsxMbV/T0+FK4qzKI6jhsLH2J+rBOE3L3cbA6HK9nWoxgeHaSzdEip+cZG9drAoM3hKTDLWM0ZGPazlyH2sMBarWQM2U6Idk2RCZ7NtFOszKi1AYRUgcxUDp1noXQ69NdqU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729253016; c=relaxed/simple; bh=wiNF0ff3M6r6j0Bx6pcmyDJZhg/F0pSyRcQaTxu63M4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=xbzL2WdbXOsGnImOScoQvx1zH9pU0sB2sQXNafe+ULKVDRZSoMdZP393kSXlkirnFU4OQdFEjJOTX2KCH7md5y+xMShFN2oqxzCffDR52526kUncJY/PoeDzVgKYPB29oqALxBtT0bWJBjOWf3gPfZs/VrTvdDB65SG4iSwxzUw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729253012; 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=avzW4ObawHoyXaK78o+1P5fFI0i39BMxa+94bAC2FV4=; b=G4+c6J63wWl/IKlRtNUOSK80gn0w/xNpA6ThABASnbp3v2yq+QT7sJl0k05rqXdWKSIlAV zOIxNfE+qoR4WW/4R/dRHsCyCLc2VsUhDVUKjT1/LVkt34cNLkj/ixVbtTOy39JJ9aN7dp yHz/5cMSnpUm4bgTtw8fCe6IRu6PoQE= 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-588-ppnTO17CMLeZqGMiMTefjw-1; Fri, 18 Oct 2024 08:03:29 -0400 X-MC-Unique: ppnTO17CMLeZqGMiMTefjw-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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 1E93119560AB; Fri, 18 Oct 2024 12:03:27 +0000 (UTC) Received: from localhost (unknown [10.42.28.5]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A6789195605A; Fri, 18 Oct 2024 12:03:26 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] libstdc++: Improve 26_numerics/headers/cmath/types_std_c++0x_neg.cc Date: Fri, 18 Oct 2024 13:02:54 +0100 Message-ID: <20241018120325.346673-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 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=ham 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 This test checks that the special functions in are not declared prior to C++17. But we can remove the target selector and allow it to be tested for C++17 and later, and add target selectors to the individual dg-error directives instead. Also rename the test to match what it actually tests. libstdc++-v3/ChangeLog: * testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc: Move to ... * testsuite/26_numerics/headers/cmath/specfun_c++17.cc: here and adjust test to be valid for all -std dialects. --- Tested x86_64-linux. ...ypes_std_c++0x_neg.cc => specfun_c++17.cc} | 47 ++++++++++--------- 1 file changed, 24 insertions(+), 23 deletions(-) rename libstdc++-v3/testsuite/26_numerics/headers/cmath/{types_std_c++0x_neg.cc => specfun_c++17.cc} (57%) diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/specfun_c++17.cc similarity index 57% rename from libstdc++-v3/testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc rename to libstdc++-v3/testsuite/26_numerics/headers/cmath/specfun_c++17.cc index 977f800a4b0..efb60ea1fbb 100644 --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/specfun_c++17.cc @@ -1,4 +1,4 @@ -// { dg-do compile { target { ! c++17 } } } +// { dg-do compile } // Copyright (C) 2007-2024 Free Software Foundation, Inc. // @@ -21,28 +21,29 @@ namespace gnu { - // C++11 changes from TR1. - using std::assoc_laguerre; // { dg-error "has not been declared" } - using std::assoc_legendre; // { dg-error "has not been declared" } - using std::beta; // { dg-error "has not been declared" } - using std::comp_ellint_1; // { dg-error "has not been declared" } - using std::comp_ellint_2; // { dg-error "has not been declared" } - using std::comp_ellint_3; // { dg-error "has not been declared" } + // C++17 additions from TR1. + using std::assoc_laguerre; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::assoc_legendre; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::beta; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::comp_ellint_1; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::comp_ellint_2; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::comp_ellint_3; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::cyl_bessel_i; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::cyl_bessel_j; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::cyl_bessel_k; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::cyl_neumann; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::ellint_1; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::ellint_2; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::ellint_3; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::expint; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::hermite; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::laguerre; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::legendre; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::riemann_zeta; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::sph_bessel; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::sph_legendre; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::sph_neumann; // { dg-error "has not been declared" "" { target { ! c++17 } } } + // These two were in TR1 but not added to C++17. using std::conf_hyperg; // { dg-error "has not been declared" } - using std::cyl_bessel_i; // { dg-error "has not been declared" } - using std::cyl_bessel_j; // { dg-error "has not been declared" } - using std::cyl_bessel_k; // { dg-error "has not been declared" } - using std::cyl_neumann; // { dg-error "has not been declared" } - using std::ellint_1; // { dg-error "has not been declared" } - using std::ellint_2; // { dg-error "has not been declared" } - using std::ellint_3; // { dg-error "has not been declared" } - using std::expint; // { dg-error "has not been declared" } - using std::hermite; // { dg-error "has not been declared" } using std::hyperg; // { dg-error "has not been declared" } - using std::laguerre; // { dg-error "has not been declared" } - using std::legendre; // { dg-error "has not been declared" } - using std::riemann_zeta; // { dg-error "has not been declared" } - using std::sph_bessel; // { dg-error "has not been declared" } - using std::sph_legendre; // { dg-error "has not been declared" } - using std::sph_neumann; // { dg-error "has not been declared" } }