From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 564C7385829F for ; Wed, 27 Jul 2022 23:23:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 564C7385829F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.93,196,1654588800"; d="scan'208";a="80290278" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 27 Jul 2022 15:23:10 -0800 IronPort-SDR: NzEZFJlY72VygfJU+ISsD5VGxBxYtrwLCmFqe3SU0pNIvku3A6FmKV0gA1uYU/NoRUNKvTupgP aF2/j9zYelB5UzRRDNpO08NI7e2RreOGzHzd+4JN5EGT6UxCuB+tm1JOt80X5HmzlfNMwas07C +3AVUvHiH1eesm3YLc6dlgKc8HzAgUhtWaereYRu42di5fKgVcq8qZQs5DiN5RYkRCP6AeaCAb TpfwbmRdb1AlS7AZLrN9gXrRVvL+8HPuPMKHdP/6qyOB2C8BF9r8+uAVVTa1R08n8fMcyydskr lsw= Date: Wed, 27 Jul 2022 23:23:04 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Tom Honermann CC: Subject: Re: [PATCH 2/3] testsuite: Add tests for C2X N2653 char8_t and UTF-8 string literal changes In-Reply-To: <20220725175948.1424695-3-tom@honermann.net> Message-ID: References: <20220725175948.1424695-1-tom@honermann.net> <20220725175948.1424695-3-tom@honermann.net> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-07.mgc.mentorg.com (139.181.222.7) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3118.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2022 23:23:14 -0000 On Mon, 25 Jul 2022, Tom Honermann via Gcc-patches wrote: > This change provides new tests for the core language and compiler > dependent library changes adopted for C2X via WG14 N2653. I'd expect this patch also to add tests verifying that u8"" strings have the old type for C11 (unless there are existing such tests, but I don't see them). > diff --git a/gcc/testsuite/gcc.dg/atomic/c2x-stdatomic-lockfree-char8_t.c b/gcc/testsuite/gcc.dg/atomic/c2x-stdatomic-lockfree-char8_t.c > new file mode 100644 > index 00000000000..37ea4c8926c > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/atomic/c2x-stdatomic-lockfree-char8_t.c > @@ -0,0 +1,42 @@ > +/* Test atomic_is_lock_free for char8_t. */ > +/* { dg-do run } */ > +/* { dg-options "-std=c2x -D_ISOC2X_SOURCE -pedantic-errors" } */ I don't think _ISOC2X_SOURCE belongs in any GCC tests. > diff --git a/gcc/testsuite/gcc.dg/atomic/gnu2x-stdatomic-lockfree-char8_t.c b/gcc/testsuite/gcc.dg/atomic/gnu2x-stdatomic-lockfree-char8_t.c > new file mode 100644 > index 00000000000..a017b134817 > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/atomic/gnu2x-stdatomic-lockfree-char8_t.c > @@ -0,0 +1,5 @@ > +/* Test atomic_is_lock_free for char8_t with -std=gnu2x. */ > +/* { dg-do run } */ > +/* { dg-options "-std=gnu2x -D_GNU_SOURCE -pedantic-errors" } */ Nor does _GNU_SOURCE (unless the test depends on glibc functionality that's only available with _GNU_SOURCE, but in that case you also need some effective-target conditionals to restrict it to appropriate glibc targets). -- Joseph S. Myers joseph@codesourcery.com