From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp68.ord1d.emailsrvr.com (smtp68.ord1d.emailsrvr.com [184.106.54.68]) by sourceware.org (Postfix) with ESMTPS id 091323858D28 for ; Sun, 31 Jul 2022 21:47:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 091323858D28 X-Auth-ID: tom@honermann.net Received: by smtp9.relay.ord1d.emailsrvr.com (Authenticated sender: tom-AT-honermann.net) with ESMTPSA id 01CB4C00B4; Sun, 31 Jul 2022 17:47:21 -0400 (EDT) Message-ID: <9c30e383-cab1-c996-ab4b-23b5a071167d@honermann.net> Date: Sun, 31 Jul 2022 17:47:20 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 2/3] testsuite: Add tests for C2X N2653 char8_t and UTF-8 string literal changes Content-Language: en-US To: Joseph Myers Cc: gcc-patches@gcc.gnu.org References: <20220725175948.1424695-1-tom@honermann.net> <20220725175948.1424695-3-tom@honermann.net> From: Tom Honermann In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Classification-ID: 717cd369-9fea-4b6c-bee8-f2435422150e-1-1 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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: Sun, 31 Jul 2022 21:47:28 -0000 On 7/27/22 7:23 PM, Joseph Myers wrote: > 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). Agreed, good catch. thank you. > >> 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. That was necessary because the first patch in this series omitted the atomic_char8_t and ATOMIC_CHAR8_T_LOCK_FREE definitions unless one of _GNU_SOURCE or _ISOC2X_SOURCE was defined. Per review of that first patch, those conditions will be removed, so there will be no need to define them here. > >> 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). Ditto. I'll post new patches shortly. Tom.