From patchwork Sat Jul 6 20:18:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1957637 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=C4rb5KyR; 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 4WGhZt0xgdz1xpP for ; Sun, 7 Jul 2024 06:20:21 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3131F38845F7 for ; Sat, 6 Jul 2024 20:20:20 +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 ABA81382EF18 for ; Sat, 6 Jul 2024 20:18:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ABA81382EF18 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 ABA81382EF18 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=1720297124; cv=none; b=Gd6u5cm1xGhklBV8zk/egEniW5icWeZ04iguzb5rEk31+r+QlDJm/ATyLBvH7ktd2A+RA/h/wnOwyE5nKPncOILIPEcvB5ANK/3T7XEbST1chSSc3noClyRusOfGld9bdjf7VfS465u8ZIrAZP2PxpwsyGN8ayl9A6PhtvWtHrw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720297124; c=relaxed/simple; bh=RsSOsZodlwPPY48SftVAC6ONhgsj+tUMvZ5WTvfvptw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=L2CRPL+VGOujQ0WJAbJF7lCmyEbum3Qz62UGFD0koZTqyrWKs+y8z5lcCNfuwTdGLt+vlmBzCEv429HvfHAvsVjRbcEj+EcdWV9cYVgPSyPXtpXzpOXAQUklvqytf5ne2E2UGCQcwpNkn+lXGBPn0s+ihZTp7D7+bDZxG3wCcBo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720297117; 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=gSK2tOeXnWqfoxEX9FotYduaosU5ZgMnrGvro6dwW7s=; b=C4rb5KyRj3MjBkpcowo5AOek9YCqZfQkepQlp/D5p+Lsvd8f42XYfwGABqRSkCBYCYuk0U RBugKJVETuYopJQicc+IWZm5bAq90fiqOeGtL7hCB6ZiRb4Kjzc8LacSt3hDrZDqrE3nay Qg+Y3LHtzYaS8A0WZr7NHzKZ6TjKBjM= Received: from mx-prod-mc-05.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-421-a8xUyGXCOg6V9Z6kl9fUbQ-1; Sat, 06 Jul 2024 16:18:33 -0400 X-MC-Unique: a8xUyGXCOg6V9Z6kl9fUbQ-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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 83E11195608B; Sat, 6 Jul 2024 20:18:32 +0000 (UTC) Received: from localhost (unknown [10.42.28.19]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0E3CD19560AA; Sat, 6 Jul 2024 20:18:30 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Remove redundant 17_intro/headers tests Date: Sat, 6 Jul 2024 21:18:17 +0100 Message-ID: <20240706201829.193384-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.1 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 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 -- We have several nearly identical tests under 17_intro/headers which only differ in a -std option set using dg-options. Since the testsuite now supports running tests with multiple -std options (and I test that regularly) we don't need these duplicated tests. We can remove most of them and let the testsuite decide which -std option to use. In the all_attributes.cc case the content of the tests is slightly different, but they can be combined into one test that defines macros conditionally based on __cplusplus checks. The stdc++.cc tests could also be combined this way, but for now I've just kept one version for c++98 and one for all later standards. For stdc++_multiple_inclusion.cc we can remove the body of the files and just include stdc++.cc twice. This means we don't need to add includes to both stdc++.cc and stdc++_multiple_inclusion.cc, we only need to update one place. libstdc++-v3/ChangeLog: * testsuite/17_intro/headers/c++1998/all_attributes.cc: Add attribute names from later standards and remove dg-options. * testsuite/17_intro/headers/c++1998/stdc++.cc: Add c++98_only target selector. * testsuite/17_intro/headers/c++1998/stdc++_multiple_inclusion.cc: Remove content and include stdc++.cc twice instead. * testsuite/17_intro/headers/c++2011/stdc++.cc: Replace dg-options with c++11 target selector. * testsuite/17_intro/headers/c++2011/stdc++_multiple_inclusion.cc: Remove content and include stdc++.cc twice instead. * testsuite/17_intro/headers/c++2011/all_attributes.cc: Removed. * testsuite/17_intro/headers/c++2011/all_no_exceptions.cc: Removed. * testsuite/17_intro/headers/c++2011/all_no_rtti.cc: Removed. * testsuite/17_intro/headers/c++2011/all_pedantic_errors.cc: Removed. * testsuite/17_intro/headers/c++2011/charset.cc: Removed. * testsuite/17_intro/headers/c++2011/operator_names.cc: Removed. * testsuite/17_intro/headers/c++2014/all_attributes.cc: Removed. * testsuite/17_intro/headers/c++2014/all_no_exceptions.cc: Removed. * testsuite/17_intro/headers/c++2014/all_no_rtti.cc: Removed. * testsuite/17_intro/headers/c++2014/all_pedantic_errors.cc: Removed. * testsuite/17_intro/headers/c++2014/charset.cc: Removed. * testsuite/17_intro/headers/c++2014/operator_names.cc: Removed. * testsuite/17_intro/headers/c++2014/stdc++.cc: Removed. * testsuite/17_intro/headers/c++2014/stdc++_multiple_inclusion.cc: Removed. * testsuite/17_intro/headers/c++2017/all_attributes.cc: Removed. * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc: Removed. * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: Removed. * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc: Removed. * testsuite/17_intro/headers/c++2017/charset.cc: Removed. * testsuite/17_intro/headers/c++2017/operator_names.cc: Removed. * testsuite/17_intro/headers/c++2017/stdc++.cc: Removed. * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc: Removed. * testsuite/17_intro/headers/c++2020/all_attributes.cc: Removed. * testsuite/17_intro/headers/c++2020/all_no_exceptions.cc: Removed. * testsuite/17_intro/headers/c++2020/all_no_rtti.cc: Removed. * testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc: Removed. * testsuite/17_intro/headers/c++2020/charset.cc: Removed. * testsuite/17_intro/headers/c++2020/operator_names.cc: Removed. * testsuite/17_intro/headers/c++2020/stdc++.cc: Removed. * testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc: Removed. --- .../headers/c++1998/all_attributes.cc | 20 ++- .../17_intro/headers/c++1998/stdc++.cc | 2 +- .../c++1998/stdc++_multiple_inclusion.cc | 53 +------- .../headers/c++2011/all_attributes.cc | 44 ------- .../headers/c++2011/all_no_exceptions.cc | 21 ---- .../17_intro/headers/c++2011/all_no_rtti.cc | 21 ---- .../headers/c++2011/all_pedantic_errors.cc | 21 ---- .../17_intro/headers/c++2011/charset.cc | 5 - .../headers/c++2011/operator_names.cc | 30 ----- .../17_intro/headers/c++2011/stdc++.cc | 5 +- .../c++2011/stdc++_multiple_inclusion.cc | 100 +-------------- .../headers/c++2014/all_attributes.cc | 44 ------- .../headers/c++2014/all_no_exceptions.cc | 21 ---- .../17_intro/headers/c++2014/all_no_rtti.cc | 21 ---- .../headers/c++2014/all_pedantic_errors.cc | 21 ---- .../17_intro/headers/c++2014/charset.cc | 5 - .../headers/c++2014/operator_names.cc | 30 ----- .../17_intro/headers/c++2014/stdc++.cc | 70 ----------- .../c++2014/stdc++_multiple_inclusion.cc | 117 ------------------ .../headers/c++2017/all_attributes.cc | 43 ------- .../headers/c++2017/all_no_exceptions.cc | 21 ---- .../17_intro/headers/c++2017/all_no_rtti.cc | 21 ---- .../headers/c++2017/all_pedantic_errors.cc | 21 ---- .../17_intro/headers/c++2017/charset.cc | 5 - .../headers/c++2017/operator_names.cc | 30 ----- .../17_intro/headers/c++2017/stdc++.cc | 69 ----------- .../c++2017/stdc++_multiple_inclusion.cc | 116 ----------------- .../headers/c++2020/all_attributes.cc | 42 ------- .../headers/c++2020/all_no_exceptions.cc | 21 ---- .../17_intro/headers/c++2020/all_no_rtti.cc | 21 ---- .../headers/c++2020/all_pedantic_errors.cc | 21 ---- .../17_intro/headers/c++2020/charset.cc | 5 - .../headers/c++2020/operator_names.cc | 30 ----- .../17_intro/headers/c++2020/stdc++.cc | 70 ----------- .../c++2020/stdc++_multiple_inclusion.cc | 117 ------------------ 35 files changed, 26 insertions(+), 1278 deletions(-) delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2011/all_no_exceptions.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2011/all_no_rtti.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2011/all_pedantic_errors.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2011/charset.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2011/operator_names.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2014/all_no_exceptions.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2014/all_no_rtti.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2014/all_pedantic_errors.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2014/charset.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2014/operator_names.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2014/stdc++.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2014/stdc++_multiple_inclusion.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2017/all_no_exceptions.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2017/all_no_rtti.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2017/charset.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2017/operator_names.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2017/stdc++.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2020/all_no_exceptions.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2020/all_no_rtti.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2020/charset.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2020/operator_names.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2020/stdc++.cc delete mode 100644 libstdc++-v3/testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc index 0c38259b74e..4f2a98214ec 100644 --- a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc +++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc @@ -15,26 +15,40 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=gnu++98" } // { dg-do compile } // Ensure the library only uses the __name__ form for attributes. // Don't test 'const' because it is reserved anyway. + #define abi_tag 1 + #ifndef __APPLE__ // darwin headers use these, see PR 64883 # define always_inline 1 # define cold 1 -# define deprecated 1 -# define noreturn 1 +# if __cplusplus < 201703L +# define deprecated 1 // Reserved since C++17 +# endif +# if __cplusplus < 201103L +# define noreturn 1 // Reserved since C++11 +# endif # define visibility 1 #endif + +#if __cplusplus < 202002L +# define no_unique_address 1 +# define likely 1 +# define unlikely 1 +#endif + #ifndef __s390__ // kernel-headers uses __attribute__((packed,aligned(4))) on // S390. #define packed 1 #endif + #define pure 1 + // glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM. #ifndef __arm__ #define unused 1 diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++.cc index 4fb9688150f..efbfdd9073d 100644 --- a/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++.cc +++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++.cc @@ -1,6 +1,6 @@ // FreeBSD wants warning clean system headers: // { dg-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } } -// { dg-do compile } +// { dg-do compile { target c++98_only } } // 1999-05-12 bkoz // Copyright (C) 1999-2024 Free Software Foundation, Inc. diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++_multiple_inclusion.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++_multiple_inclusion.cc index 4ab8f6d6b52..70dea118683 100644 --- a/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++_multiple_inclusion.cc +++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++_multiple_inclusion.cc @@ -22,54 +22,5 @@ // 17.4.1.2 Headers -#include - -// "C" compatibility headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif - -#include - -// "C" compatibility headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif +#include "stdc++.cc" +#include "stdc++.cc" diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc deleted file mode 100644 index cc34a35ae4d..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -// { dg-options "-std=gnu++11" } -// { dg-do compile } - -// Ensure the library only uses the __name__ form for attributes. -// Don't test 'const' and 'noreturn' because they are reserved anyway. -#define abi_tag 1 -#ifndef __APPLE__ -// darwin headers use these, see PR 64883 -# define always_inline 1 -# define cold 1 -# define deprecated 1 -# define visibility 1 -#endif -#define no_unique_address 1 -#ifndef __s390__ -// kernel-headers uses __attribute__((packed,aligned(4))) on -// S390. -#define packed 1 -#endif -#define pure 1 -// glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM. -#ifndef __arm__ -#define unused 1 -#endif - -#include -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_no_exceptions.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_no_exceptions.cc deleted file mode 100644 index cd534697d1d..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_no_exceptions.cc +++ /dev/null @@ -1,21 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++11 -fno-exceptions" } - -// Copyright (C) 2007-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_no_rtti.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_no_rtti.cc deleted file mode 100644 index 777195ac726..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_no_rtti.cc +++ /dev/null @@ -1,21 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++11 -fno-rtti" } - -// Copyright (C) 2010-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_pedantic_errors.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_pedantic_errors.cc deleted file mode 100644 index f4dc048e0c4..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_pedantic_errors.cc +++ /dev/null @@ -1,21 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++11 -pedantic-errors" } - -// Copyright (C) 2007-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2011/charset.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/charset.cc deleted file mode 100644 index e76edea1559..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2011/charset.cc +++ /dev/null @@ -1,5 +0,0 @@ -// { dg-options "-finput-charset=ascii" } -// { dg-do compile } -// { dg-skip-if "non-ascii in system headers" { *-*-hpux* *-*-darwin10* *-*-darwin[89]* } } - -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2011/operator_names.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/operator_names.cc deleted file mode 100644 index 3e938599454..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2011/operator_names.cc +++ /dev/null @@ -1,30 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++11 -fno-operator-names" } - -// Copyright (C) 2011-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -// libstdc++/47662 - -// Avoid using PCH -#include -#include -#include -#include - -int or, xor, and; - diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2011/stdc++.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/stdc++.cc index dbbc7b1c07b..89cad3beb30 100644 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2011/stdc++.cc +++ b/libstdc++-v3/testsuite/17_intro/headers/c++2011/stdc++.cc @@ -1,7 +1,6 @@ // FreeBSD wants warning clean system headers: -// { dg-options "-std=gnu++11" } -// { dg-additional-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } } -// { dg-do compile } +// { dg-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } } +// { dg-do compile { target c++11 } } // Copyright (C) 2007-2024 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2011/stdc++_multiple_inclusion.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/stdc++_multiple_inclusion.cc index ec271cb4afe..5f86994ee61 100644 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2011/stdc++_multiple_inclusion.cc +++ b/libstdc++-v3/testsuite/17_intro/headers/c++2011/stdc++_multiple_inclusion.cc @@ -1,7 +1,6 @@ // FreeBSD wants warning clean system headers: -// { dg-options "-std=gnu++11" } -// { dg-additional-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } } -// { dg-do compile } +// { dg-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } } +// { dg-do compile { target c++11 } } // Copyright (C) 2007-2024 Free Software Foundation, Inc. // @@ -22,96 +21,5 @@ // 17.4.1.2 Headers -#include - -// "C" compatibility headers -#include -#ifdef _GLIBCXX_HAVE_COMPLEX_H -#include -#endif -#include -#include -#ifdef _GLIBCXX_HAVE_FENV_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_INTTYPES_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_STDBOOL_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_STDINT_H -#include -#endif -#include -#include -#include -#ifdef _GLIBCXX_HAVE_TGMATH_H -#include -#endif -#include -#if __has_include() -#include -#endif -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif - -#include - -// "C" compatibility headers -#include -#ifdef _GLIBCXX_HAVE_COMPLEX_H -#include -#endif -#include -#include -#ifdef _GLIBCXX_HAVE_FENV_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_INTTYPES_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_STDBOOL_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_STDINT_H -#include -#endif -#include -#include -#include -#ifdef _GLIBCXX_HAVE_TGMATH_H -#include -#endif -#include -#if __has_include() -#include -#endif -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif +#include "stdc++.cc" +#include "stdc++.cc" diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc deleted file mode 100644 index 80d0852453b..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -// { dg-options "-std=gnu++14" } -// { dg-do compile } - -// Ensure the library only uses the __name__ form for attributes. -// Don't test 'const' and 'noreturn' because they are reserved anyway. -#define abi_tag 1 -#ifndef __APPLE__ -// darwin headers use these, see PR 64883 -# define always_inline 1 -# define cold 1 -# define deprecated 1 -# define visibility 1 -#endif -#define no_unique_address 1 -#ifndef __s390__ -// kernel-headers uses __attribute__((packed,aligned(4))) on -// S390. -#define packed 1 -#endif -#define pure 1 -// glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM. -#ifndef __arm__ -#define unused 1 -#endif - -#include -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_no_exceptions.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_no_exceptions.cc deleted file mode 100644 index 1c67b0d918f..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_no_exceptions.cc +++ /dev/null @@ -1,21 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++14 -fno-exceptions" } - -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_no_rtti.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_no_rtti.cc deleted file mode 100644 index 5ae6510f71b..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_no_rtti.cc +++ /dev/null @@ -1,21 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++14 -fno-rtti" } - -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_pedantic_errors.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_pedantic_errors.cc deleted file mode 100644 index ec29e4d0ba9..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_pedantic_errors.cc +++ /dev/null @@ -1,21 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++14 -pedantic-errors" } - -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/charset.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/charset.cc deleted file mode 100644 index e76edea1559..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2014/charset.cc +++ /dev/null @@ -1,5 +0,0 @@ -// { dg-options "-finput-charset=ascii" } -// { dg-do compile } -// { dg-skip-if "non-ascii in system headers" { *-*-hpux* *-*-darwin10* *-*-darwin[89]* } } - -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/operator_names.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/operator_names.cc deleted file mode 100644 index 39e044ad5bd..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2014/operator_names.cc +++ /dev/null @@ -1,30 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++14 -fno-operator-names" } - -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -// libstdc++/47662 - -// Avoid using PCH -#include -#include -#include -#include - -int or, xor, and; - diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/stdc++.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/stdc++.cc deleted file mode 100644 index 6124785bea4..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2014/stdc++.cc +++ /dev/null @@ -1,70 +0,0 @@ -// FreeBSD wants warning clean system headers: -// { dg-options "-std=gnu++14" } -// { dg-additional-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } } -// { dg-do compile } - -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -// 17.4.1.2 Headers - -#include - -// "C" compatibility headers -#include -#ifdef _GLIBCXX_HAVE_COMPLEX_H -#include -#endif -#include -#include -#ifdef _GLIBCXX_HAVE_FENV_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_INTTYPES_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_STDBOOL_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_STDINT_H -#include -#endif -#include -#include -#include -#ifdef _GLIBCXX_HAVE_TGMATH_H -#include -#endif -#include -#if __has_include() -#include -#endif -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/stdc++_multiple_inclusion.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/stdc++_multiple_inclusion.cc deleted file mode 100644 index a6b5cbf42a4..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2014/stdc++_multiple_inclusion.cc +++ /dev/null @@ -1,117 +0,0 @@ -// FreeBSD wants warning clean system headers: -// { dg-options "-std=gnu++14" } -// { dg-additional-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } } -// { dg-do compile } - -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -// 17.4.1.2 Headers - -#include - -// "C" compatibility headers -#include -#ifdef _GLIBCXX_HAVE_COMPLEX_H -#include -#endif -#include -#include -#ifdef _GLIBCXX_HAVE_FENV_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_INTTYPES_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_STDBOOL_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_STDINT_H -#include -#endif -#include -#include -#include -#ifdef _GLIBCXX_HAVE_TGMATH_H -#include -#endif -#include -#if __has_include() -#include -#endif -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif - -#include - -// "C" compatibility headers -#include -#ifdef _GLIBCXX_HAVE_COMPLEX_H -#include -#endif -#include -#include -#ifdef _GLIBCXX_HAVE_FENV_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_INTTYPES_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_STDBOOL_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_STDINT_H -#include -#endif -#include -#include -#include -#ifdef _GLIBCXX_HAVE_TGMATH_H -#include -#endif -#include -#if __has_include() -#include -#endif -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc deleted file mode 100644 index 4f8ba4d10ba..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -// { dg-options "-std=gnu++17" } -// { dg-do compile { target c++17 } } - -// Ensure the library only uses the __name__ form for attributes. -// Don't test 'const' and 'noreturn' because they are reserved anyway. -#define abi_tag 1 -#ifndef __APPLE__ -// darwin headers use these, see PR 64883 -# define always_inline 1 -# define cold 1 -# define visibility 1 -#endif -#define no_unique_address 1 -#ifndef __s390__ -// kernel-headers uses __attribute__((packed,aligned(4))) on -// S390. -#define packed 1 -#endif -#define pure 1 -// glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM. -#ifndef __arm__ -#define unused 1 -#endif - -#include -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_no_exceptions.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_no_exceptions.cc deleted file mode 100644 index e5156ed5da7..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_no_exceptions.cc +++ /dev/null @@ -1,21 +0,0 @@ -// { dg-options "-fno-exceptions" } -// { dg-do compile { target c++17 } } - -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_no_rtti.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_no_rtti.cc deleted file mode 100644 index 1c511427b3a..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_no_rtti.cc +++ /dev/null @@ -1,21 +0,0 @@ -// { dg-options "-std=gnu++17 -fno-rtti" } -// { dg-do compile { target c++17 } } - -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc deleted file mode 100644 index 4dd9e12002c..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc +++ /dev/null @@ -1,21 +0,0 @@ -// { dg-options "-pedantic-errors" } -// { dg-do compile { target c++17 } } - -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/charset.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/charset.cc deleted file mode 100644 index e76edea1559..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/charset.cc +++ /dev/null @@ -1,5 +0,0 @@ -// { dg-options "-finput-charset=ascii" } -// { dg-do compile } -// { dg-skip-if "non-ascii in system headers" { *-*-hpux* *-*-darwin10* *-*-darwin[89]* } } - -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/operator_names.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/operator_names.cc deleted file mode 100644 index 5de07811e68..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/operator_names.cc +++ /dev/null @@ -1,30 +0,0 @@ -// { dg-options "-fno-operator-names" } -// { dg-do compile { target c++17 } } - -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -// libstdc++/47662 - -// Avoid using PCH -#include -#include -#include -#include - -int or, xor, and; - diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/stdc++.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/stdc++.cc deleted file mode 100644 index 4e46585582d..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/stdc++.cc +++ /dev/null @@ -1,69 +0,0 @@ -// FreeBSD wants warning clean system headers: -// { dg-additional-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } } -// { dg-do compile { target c++17 } } - -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -// 17.4.1.2 Headers - -#include - -// "C" compatibility headers -#include -#ifdef _GLIBCXX_HAVE_COMPLEX_H -#include -#endif -#include -#include -#ifdef _GLIBCXX_HAVE_FENV_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_INTTYPES_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_STDBOOL_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_STDINT_H -#include -#endif -#include -#include -#include -#ifdef _GLIBCXX_HAVE_TGMATH_H -#include -#endif -#include -#if __has_include() -#include -#endif -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc deleted file mode 100644 index ac07ca95662..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc +++ /dev/null @@ -1,116 +0,0 @@ -// FreeBSD wants warning clean system headers: -// { dg-additional-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } } -// { dg-do compile { target c++17 } } - -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -// 17.4.1.2 Headers - -#include - -// "C" compatibility headers -#include -#ifdef _GLIBCXX_HAVE_COMPLEX_H -#include -#endif -#include -#include -#ifdef _GLIBCXX_HAVE_FENV_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_INTTYPES_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_STDBOOL_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_STDINT_H -#include -#endif -#include -#include -#include -#ifdef _GLIBCXX_HAVE_TGMATH_H -#include -#endif -#include -#if __has_include() -#include -#endif -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif - -#include - -// "C" compatibility headers -#include -#ifdef _GLIBCXX_HAVE_COMPLEX_H -#include -#endif -#include -#include -#ifdef _GLIBCXX_HAVE_FENV_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_INTTYPES_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_STDBOOL_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_STDINT_H -#include -#endif -#include -#include -#include -#ifdef _GLIBCXX_HAVE_TGMATH_H -#include -#endif -#include -#if __has_include() -#include -#endif -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc deleted file mode 100644 index 3de1488a737..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -// { dg-options "-std=gnu++2a" } -// { dg-do compile } - -// Ensure the library only uses the __name__ form for attributes. -// Don't test 'const' and 'noreturn' because they are reserved anyway. -#define abi_tag 1 -#ifndef __APPLE__ -// darwin headers use these, see PR 64883 -# define always_inline 1 -# define cold 1 -# define visibility 1 -#endif -#ifndef __s390__ -// kernel-headers uses __attribute__((packed,aligned(4))) on -// S390. -#define packed 1 -#endif -#define pure 1 -// glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM. -#ifndef __arm__ -#define unused 1 -#endif - -#include -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_no_exceptions.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_no_exceptions.cc deleted file mode 100644 index 79936822de6..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_no_exceptions.cc +++ /dev/null @@ -1,21 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++2a -fno-exceptions" } - -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_no_rtti.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_no_rtti.cc deleted file mode 100644 index 81cee0aa857..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_no_rtti.cc +++ /dev/null @@ -1,21 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++2a -fno-rtti" } - -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc deleted file mode 100644 index 4f94db17a30..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc +++ /dev/null @@ -1,21 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++2a -pedantic-errors" } - -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2020/charset.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2020/charset.cc deleted file mode 100644 index e76edea1559..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2020/charset.cc +++ /dev/null @@ -1,5 +0,0 @@ -// { dg-options "-finput-charset=ascii" } -// { dg-do compile } -// { dg-skip-if "non-ascii in system headers" { *-*-hpux* *-*-darwin10* *-*-darwin[89]* } } - -#include diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2020/operator_names.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2020/operator_names.cc deleted file mode 100644 index 2ce5f423c2e..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2020/operator_names.cc +++ /dev/null @@ -1,30 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++2a -fno-operator-names" } - -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -// libstdc++/47662 - -// Avoid using PCH -#include -#include -#include -#include - -int or, xor, and; - diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2020/stdc++.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2020/stdc++.cc deleted file mode 100644 index 4a61fbb714b..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2020/stdc++.cc +++ /dev/null @@ -1,70 +0,0 @@ -// FreeBSD wants warning clean system headers: -// { dg-options "-std=gnu++2a" } -// { dg-additional-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } } -// { dg-do compile } - -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -// 17.4.1.2 Headers - -#include - -// "C" compatibility headers -#include -#ifdef _GLIBCXX_HAVE_COMPLEX_H -#include -#endif -#include -#include -#ifdef _GLIBCXX_HAVE_FENV_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_INTTYPES_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_STDBOOL_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_STDINT_H -#include -#endif -#include -#include -#include -#ifdef _GLIBCXX_HAVE_TGMATH_H -#include -#endif -#include -#if __has_include() -#include -#endif -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc deleted file mode 100644 index da1228079e5..00000000000 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc +++ /dev/null @@ -1,117 +0,0 @@ -// FreeBSD wants warning clean system headers: -// { dg-options "-std=gnu++2a" } -// { dg-additional-options "-Wall -Wsystem-headers" { target *-*-freebsd* *-*-dragonfly* } } -// { dg-do compile } - -// Copyright (C) 2015-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -// 17.4.1.2 Headers - -#include - -// "C" compatibility headers -#include -#ifdef _GLIBCXX_HAVE_COMPLEX_H -#include -#endif -#include -#include -#ifdef _GLIBCXX_HAVE_FENV_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_INTTYPES_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_STDBOOL_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_STDINT_H -#include -#endif -#include -#include -#include -#ifdef _GLIBCXX_HAVE_TGMATH_H -#include -#endif -#include -#if __has_include() -#include -#endif -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif - -#include - -// "C" compatibility headers -#include -#ifdef _GLIBCXX_HAVE_COMPLEX_H -#include -#endif -#include -#include -#ifdef _GLIBCXX_HAVE_FENV_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_INTTYPES_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#ifdef _GLIBCXX_HAVE_STDBOOL_H -#include -#endif -#include -#ifdef _GLIBCXX_HAVE_STDINT_H -#include -#endif -#include -#include -#include -#ifdef _GLIBCXX_HAVE_TGMATH_H -#include -#endif -#include -#if __has_include() -#include -#endif -#ifdef _GLIBCXX_HAVE_WCHAR_H -#include -#endif -#ifdef _GLIBCXX_HAVE_WCTYPE_H -#include -#endif