From patchwork Mon Apr 8 16:45:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1920948 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=f014COli; 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 4VCw3T14Crz1yY8 for ; Tue, 9 Apr 2024 02:46:45 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 483FA3858282 for ; Mon, 8 Apr 2024 16:46:43 +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 3AA86385841F for ; Mon, 8 Apr 2024 16:45:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3AA86385841F 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 3AA86385841F 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=1712594754; cv=none; b=DjeuqtISuWO12px3NwRW9EVBuTwt3cGWDaQvFlrqg97H+4D316m1BmGpPjPZdK6YNbMWTuYlp8jFZgMMfKNF9KwA3c8O0m9Hti8nAQRMyGYs+L7vS7a/ddiKeNa/nnz7rCCgqli2tfxV1Jn6BgHUXpTLlxFVrN9sF0VvHpanTxE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712594754; c=relaxed/simple; bh=OYBwaL1UAaMgE+fhLoqw+EuAYdPtEFZChcUhEeG9SBk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=SjsqEzAoVMqr7/84bpl3RclPNApYFke4SdzoReESTsHXQeOzyEv+qygbcA5bJ/EfdlmsMNB1SpZ/SnWqLWY4wl1qt6iu6mx25o4h9Iem2ww6y+42tOcl7BpinApxzJOwcLp9Z79BNem+W070BZrwmYOE5QuoVijw4Q8hOa3I3ug= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712594748; 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=t7IcXxM4R6mT2Q41byrc07JkiCqAXbaWf7hD47TTHns=; b=f014COlio9dBNEmtjirTKnxRWtnlp0Ae8wZXq1cvwWu4LVUwJm+CDOHwFj/Bn45PXoofPG DU3EkVwp8o1q9tFZFJM3XRMc44T8dAGn0DCdQpqe4ZC6JPQDnzvDgStVqoB6OiM4PNP5f3 KZD6KCtNRuXvA9RYFtsdmMv5qQVzpH0= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-613-c6DkcMjjMmKVuilDzxGK6Q-1; Mon, 08 Apr 2024 12:45:47 -0400 X-MC-Unique: c6DkcMjjMmKVuilDzxGK6Q-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0BE0B1C3F0ED; Mon, 8 Apr 2024 16:45:47 +0000 (UTC) Received: from localhost (unknown [10.42.28.163]) by smtp.corp.redhat.com (Postfix) with ESMTP id B983B10060FE; Mon, 8 Apr 2024 16:45:46 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Fix tests that fail with -fno-char8_t Date: Mon, 8 Apr 2024 17:45:35 +0100 Message-ID: <20240408164542.196524-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.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=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 Tested x86_64-linux and aarch64-linux. Pushed to trunk. -- >8 -- Adjust expected errors or skip tests as UNSUPPORTED if -fno-char8_t is used in the test flags. libstdc++-v3/ChangeLog: * testsuite/20_util/integer_comparisons/equal_neg.cc: Use no-opts selector for errors that depend on -fchar8_t. * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: Likewise. * testsuite/20_util/integer_comparisons/greater_neg.cc: Likewise. * testsuite/20_util/integer_comparisons/in_range_neg.cc: Likewise. * testsuite/20_util/integer_comparisons/less_equal_neg.cc: Likewise. * testsuite/20_util/integer_comparisons/less_neg.cc: Likewise. * testsuite/20_util/integer_comparisons/not_equal_neg.cc: Likewise. * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: Skip if -fno-char8_t is used. * testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_character/char/deleted.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_character/wchar_t/deleted.cc: Likewise. * testsuite/27_io/filesystem/path/factory/u8path-depr.cc: Use char for u8 literal if char8_t is not available. * testsuite/27_io/headers/iosfwd/synopsis.cc: Check __cpp_char8_t. * testsuite/29_atomics/atomic_integral/wait_notify.cc: Likewise. * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: Remove check for _GLIBCXX_USE_CHAR8_T. --- .../testsuite/20_util/integer_comparisons/equal_neg.cc | 4 ++-- .../20_util/integer_comparisons/greater_equal_neg.cc | 4 ++-- .../testsuite/20_util/integer_comparisons/greater_neg.cc | 4 ++-- .../testsuite/20_util/integer_comparisons/in_range_neg.cc | 6 ++++-- .../testsuite/20_util/integer_comparisons/less_equal_neg.cc | 4 ++-- .../testsuite/20_util/integer_comparisons/less_neg.cc | 4 ++-- .../testsuite/20_util/integer_comparisons/not_equal_neg.cc | 4 ++-- .../testsuite/21_strings/basic_string/hash/hash_char8_t.cc | 1 + .../21_strings/headers/cuchar/functions_std_cxx20.cc | 1 + .../27_io/basic_ostream/inserters_character/char/deleted.cc | 1 + .../basic_ostream/inserters_character/wchar_t/deleted.cc | 1 + .../testsuite/27_io/filesystem/path/factory/u8path-depr.cc | 4 +++- libstdc++-v3/testsuite/27_io/headers/iosfwd/synopsis.cc | 2 +- .../testsuite/29_atomics/atomic_integral/wait_notify.cc | 2 ++ .../29_atomics/headers/atomic/types_std_c++20_neg.cc | 2 -- 15 files changed, 26 insertions(+), 18 deletions(-) diff --git a/libstdc++-v3/testsuite/20_util/integer_comparisons/equal_neg.cc b/libstdc++-v3/testsuite/20_util/integer_comparisons/equal_neg.cc index 06cfd6ee8f4..7290e9e2417 100644 --- a/libstdc++-v3/testsuite/20_util/integer_comparisons/equal_neg.cc +++ b/libstdc++-v3/testsuite/20_util/integer_comparisons/equal_neg.cc @@ -25,8 +25,8 @@ bool c = std::cmp_equal(2, L'2'); // { dg-error "here" } bool d = std::cmp_equal(L'2', 2); // { dg-error "here" } bool e = std::cmp_equal(true, 1); // { dg-error "here" } bool f = std::cmp_equal(0, false); // { dg-error "here" } -bool g = std::cmp_equal(97, u8'a'); // { dg-error "here" } -bool h = std::cmp_equal(u8'a', 97); // { dg-error "here" } +bool g = std::cmp_equal(97, u8'a'); // { dg-error "here" "" { target { no-opts "-fno-char8_t" } } } +bool h = std::cmp_equal(u8'a', 97); // { dg-error "here" "" { target { no-opts "-fno-char8_t" } } } bool i = std::cmp_equal(97, u'a'); // { dg-error "here" } bool j = std::cmp_equal(u'a', 97); // { dg-error "here" } bool k = std::cmp_equal(97, U'a'); // { dg-error "here" } diff --git a/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_equal_neg.cc b/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_equal_neg.cc index b5f03b70733..cb60bfe9d07 100644 --- a/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_equal_neg.cc +++ b/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_equal_neg.cc @@ -25,8 +25,8 @@ bool c = std::cmp_greater_equal(2, L'2'); // { dg-error "constexpr" } bool d = std::cmp_greater_equal(L'2', 2); // { dg-error "constexpr" } bool e = std::cmp_greater_equal(true, 1); // { dg-error "constexpr" } bool f = std::cmp_greater_equal(0, false); // { dg-error "constexpr" } -bool g = std::cmp_greater_equal(97, u8'a'); // { dg-error "constexpr" } -bool h = std::cmp_greater_equal(u8'a', 97); // { dg-error "constexpr" } +bool g = std::cmp_greater_equal(97, u8'a'); // { dg-error "constexpr" "" { target { no-opts "-fno-char8_t" } } } +bool h = std::cmp_greater_equal(u8'a', 97); // { dg-error "constexpr" "" { target { no-opts "-fno-char8_t" } } } bool i = std::cmp_greater_equal(97, u'a'); // { dg-error "constexpr" } bool j = std::cmp_greater_equal(u'a', 97); // { dg-error "constexpr" } bool k = std::cmp_greater_equal(97, U'a'); // { dg-error "constexpr" } diff --git a/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_neg.cc b/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_neg.cc index 676a03b47fd..d5ff52cee54 100644 --- a/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_neg.cc +++ b/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_neg.cc @@ -25,8 +25,8 @@ bool c = std::cmp_greater(2, L'2'); // { dg-error "constexpr" } bool d = std::cmp_greater(L'2', 2); // { dg-error "constexpr" } bool e = std::cmp_greater(true, 1); // { dg-error "constexpr" } bool f = std::cmp_greater(0, false); // { dg-error "constexpr" } -bool g = std::cmp_greater(97, u8'a'); // { dg-error "constexpr" } -bool h = std::cmp_greater(u8'a', 97); // { dg-error "constexpr" } +bool g = std::cmp_greater(97, u8'a'); // { dg-error "constexpr" "" { target { no-opts "-fno-char8_t" } } } +bool h = std::cmp_greater(u8'a', 97); // { dg-error "constexpr" "" { target { no-opts "-fno-char8_t" } } } bool i = std::cmp_greater(97, u'a'); // { dg-error "constexpr" } bool j = std::cmp_greater(u'a', 97); // { dg-error "constexpr" } bool k = std::cmp_greater(97, U'a'); // { dg-error "constexpr" } diff --git a/libstdc++-v3/testsuite/20_util/integer_comparisons/in_range_neg.cc b/libstdc++-v3/testsuite/20_util/integer_comparisons/in_range_neg.cc index a6b071aed77..bf50abe356a 100644 --- a/libstdc++-v3/testsuite/20_util/integer_comparisons/in_range_neg.cc +++ b/libstdc++-v3/testsuite/20_util/integer_comparisons/in_range_neg.cc @@ -25,8 +25,10 @@ bool c = std::in_range(L'2'); // { dg-error "here" } bool d = std::in_range(2); // { dg-error "here" } bool e = std::in_range(true); // { dg-error "here" } bool f = std::in_range(0); // { dg-error "here" } -bool g = std::in_range(u8'a'); // { dg-error "here" } -bool h = std::in_range(97); // { dg-error "here" } +bool g = std::in_range(u8'a'); // { dg-error "here" "" { target { no-opts "-fno-char8_t" } } } +#ifdef __cpp_char8_t +bool h = std::in_range(97); // { dg-error "here" "" { target { no-opts "-fno-char8_t" } } } +#endif bool i = std::in_range(u'a'); // { dg-error "here" } bool j = std::in_range(97); // { dg-error "here" } bool k = std::in_range(U'a'); // { dg-error "here" } diff --git a/libstdc++-v3/testsuite/20_util/integer_comparisons/less_equal_neg.cc b/libstdc++-v3/testsuite/20_util/integer_comparisons/less_equal_neg.cc index ce8f3b5d9ce..f15acb9ec3d 100644 --- a/libstdc++-v3/testsuite/20_util/integer_comparisons/less_equal_neg.cc +++ b/libstdc++-v3/testsuite/20_util/integer_comparisons/less_equal_neg.cc @@ -25,8 +25,8 @@ bool c = std::cmp_less_equal(2, L'2'); // { dg-error "constexpr" } bool d = std::cmp_less_equal(L'2', 2); // { dg-error "constexpr" } bool e = std::cmp_less_equal(true, 1); // { dg-error "constexpr" } bool f = std::cmp_less_equal(0, false); // { dg-error "constexpr" } -bool g = std::cmp_less_equal(97, u8'a'); // { dg-error "constexpr" } -bool h = std::cmp_less_equal(u8'a', 97); // { dg-error "constexpr" } +bool g = std::cmp_less_equal(97, u8'a'); // { dg-error "constexpr" "" { target { no-opts "-fno-char8_t" } } } +bool h = std::cmp_less_equal(u8'a', 97); // { dg-error "constexpr" "" { target { no-opts "-fno-char8_t" } } } bool i = std::cmp_less_equal(97, u'a'); // { dg-error "constexpr" } bool j = std::cmp_less_equal(u'a', 97); // { dg-error "constexpr" } bool k = std::cmp_less_equal(97, U'a'); // { dg-error "constexpr" } diff --git a/libstdc++-v3/testsuite/20_util/integer_comparisons/less_neg.cc b/libstdc++-v3/testsuite/20_util/integer_comparisons/less_neg.cc index 4bc9bfe0af2..2d08662f8d8 100644 --- a/libstdc++-v3/testsuite/20_util/integer_comparisons/less_neg.cc +++ b/libstdc++-v3/testsuite/20_util/integer_comparisons/less_neg.cc @@ -25,8 +25,8 @@ bool c = std::cmp_less(2, L'2'); // { dg-error "here" } bool d = std::cmp_less(L'2', 2); // { dg-error "here" } bool e = std::cmp_less(true, 1); // { dg-error "here" } bool f = std::cmp_less(0, false); // { dg-error "here" } -bool g = std::cmp_less(97, u8'a'); // { dg-error "here" } -bool h = std::cmp_less(u8'a', 97); // { dg-error "here" } +bool g = std::cmp_less(97, u8'a'); // { dg-error "here" "" { target { no-opts "-fno-char8_t" } } } +bool h = std::cmp_less(u8'a', 97); // { dg-error "here" "" { target { no-opts "-fno-char8_t" } } } bool i = std::cmp_less(97, u'a'); // { dg-error "here" } bool j = std::cmp_less(u'a', 97); // { dg-error "here" } bool k = std::cmp_less(97, U'a'); // { dg-error "here" } diff --git a/libstdc++-v3/testsuite/20_util/integer_comparisons/not_equal_neg.cc b/libstdc++-v3/testsuite/20_util/integer_comparisons/not_equal_neg.cc index 06cfd6ee8f4..7290e9e2417 100644 --- a/libstdc++-v3/testsuite/20_util/integer_comparisons/not_equal_neg.cc +++ b/libstdc++-v3/testsuite/20_util/integer_comparisons/not_equal_neg.cc @@ -25,8 +25,8 @@ bool c = std::cmp_equal(2, L'2'); // { dg-error "here" } bool d = std::cmp_equal(L'2', 2); // { dg-error "here" } bool e = std::cmp_equal(true, 1); // { dg-error "here" } bool f = std::cmp_equal(0, false); // { dg-error "here" } -bool g = std::cmp_equal(97, u8'a'); // { dg-error "here" } -bool h = std::cmp_equal(u8'a', 97); // { dg-error "here" } +bool g = std::cmp_equal(97, u8'a'); // { dg-error "here" "" { target { no-opts "-fno-char8_t" } } } +bool h = std::cmp_equal(u8'a', 97); // { dg-error "here" "" { target { no-opts "-fno-char8_t" } } } bool i = std::cmp_equal(97, u'a'); // { dg-error "here" } bool j = std::cmp_equal(u'a', 97); // { dg-error "here" } bool k = std::cmp_equal(97, U'a'); // { dg-error "here" } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/hash/hash_char8_t.cc b/libstdc++-v3/testsuite/21_strings/basic_string/hash/hash_char8_t.cc index 1ef48718721..8cd603da17f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/hash/hash_char8_t.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/hash/hash_char8_t.cc @@ -16,6 +16,7 @@ // . // { dg-do run { target c++20 } } +// { dg-skip-if "" { *-*-* } { "-fno-char8_t" } } #include #include diff --git a/libstdc++-v3/testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc b/libstdc++-v3/testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc index 1964803cbd1..71c62e98203 100644 --- a/libstdc++-v3/testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc +++ b/libstdc++-v3/testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc @@ -1,4 +1,5 @@ // { dg-do compile { target c++20 } } +// { dg-skip-if "" { *-*-* } { "-fno-char8_t" } } #include diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/deleted.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/deleted.cc index e57bda8ecc1..95f4aeb010e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/deleted.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/deleted.cc @@ -20,6 +20,7 @@ // Test character inserters defined as deleted by P1423. // { dg-do compile { target c++20 } } +// { dg-skip-if "" { *-*-* } { "-fno-char8_t" } } #include diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/deleted.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/deleted.cc index 89b560418a1..5203dd6e1ce 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/deleted.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/deleted.cc @@ -20,6 +20,7 @@ // Test wide character inserters defined as deleted by P1423. // { dg-do compile { target c++20 } } +// { dg-skip-if "" { *-*-* } { "-fno-char8_t" } } #include diff --git a/libstdc++-v3/testsuite/27_io/filesystem/path/factory/u8path-depr.cc b/libstdc++-v3/testsuite/27_io/filesystem/path/factory/u8path-depr.cc index ffa59979ec9..48827ea44cf 100644 --- a/libstdc++-v3/testsuite/27_io/filesystem/path/factory/u8path-depr.cc +++ b/libstdc++-v3/testsuite/27_io/filesystem/path/factory/u8path-depr.cc @@ -10,6 +10,8 @@ auto p2 = fs::u8path(s, s); // { dg-warning "deprecated" } #if __cpp_lib_char8_t const char8_t* u = u8""; +#else +const char* u = u8""; +#endif auto p3 = fs::u8path(u); // { dg-warning "deprecated" } auto p4 = fs::u8path(u, u); // { dg-warning "deprecated" } -#endif diff --git a/libstdc++-v3/testsuite/27_io/headers/iosfwd/synopsis.cc b/libstdc++-v3/testsuite/27_io/headers/iosfwd/synopsis.cc index 12f47ae8133..8d9501f42ef 100644 --- a/libstdc++-v3/testsuite/27_io/headers/iosfwd/synopsis.cc +++ b/libstdc++-v3/testsuite/27_io/headers/iosfwd/synopsis.cc @@ -9,7 +9,7 @@ namespace std template struct char_traits; template<> struct char_traits; -#if __cplusplus >= 202002L +#if __cplusplus >= 202002L && defined __cpp_char8_t template<> struct char_traits; #endif #if __cplusplus >= 201103L diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/wait_notify.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/wait_notify.cc index 355269118a6..b3d2f928ad5 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/wait_notify.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/wait_notify.cc @@ -59,7 +59,9 @@ main () check(); check(); +#if __cpp_char8_t check(); +#endif check(); check(); diff --git a/libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc b/libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc index 0da206a5b00..c3aebb2c5d9 100644 --- a/libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc +++ b/libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc @@ -47,9 +47,7 @@ void test01() using atomic_llong; // { dg-error "expected nested-name-specifier" } using atomic_ullong; // { dg-error "expected nested-name-specifier" } using atomic_wchar_t; // { dg-error "expected nested-name-specifier" } -#ifdef _GLIBCXX_USE_CHAR8_T using atomic_char8_t; // { dg-error "expected nested-name-specifier" } -#endif using atomic_char16_t; // { dg-error "expected nested-name-specifier" } using atomic_char32_t; // { dg-error "expected nested-name-specifier" }