From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp74.iad3b.emailsrvr.com (smtp74.iad3b.emailsrvr.com [146.20.161.74]) by sourceware.org (Postfix) with ESMTPS id 28EE3385802B for ; Mon, 1 Aug 2022 22:36:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 28EE3385802B X-Auth-ID: tom@honermann.net Received: by smtp18.relay.iad3b.emailsrvr.com (Authenticated sender: tom-AT-honermann.net) with ESMTPSA id 9D0A6E012F; Mon, 1 Aug 2022 18:36:30 -0400 (EDT) Message-ID: <19c46009-c18f-6245-f32c-040cf4696067@honermann.net> Date: Mon, 1 Aug 2022 18:36:29 -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 v2] 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-3-tom@honermann.net> <20220801183414.1325381-1-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: 5f33d6ce-50a2-47c6-8893-e4b3ec8d535a-1-1 X-Spam-Status: No, score=-10.9 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: Mon, 01 Aug 2022 22:36:34 -0000 On 8/1/22 3:13 PM, Joseph Myers wrote: > On Mon, 1 Aug 2022, Tom Honermann via Gcc-patches wrote: > >> diff --git a/gcc/testsuite/gcc.dg/c2x-predefined-macros.c b/gcc/testsuite/gcc.dg/c2x-predefined-macros.c >> new file mode 100644 >> index 00000000000..3456105563a >> --- /dev/null >> +++ b/gcc/testsuite/gcc.dg/c2x-predefined-macros.c >> @@ -0,0 +1,11 @@ >> +/* Test C2X predefined macros. */ >> +/* { dg-do compile } */ >> +/* { dg-options "-std=c2x" } */ >> + >> +#if !defined(__CHAR8_TYPE__) >> +# error __CHAR8_TYPE__ is not defined! >> +#endif >> + >> +#if !defined(__GCC_ATOMIC_CHAR8_T_LOCK_FREE) >> +# error __GCC_ATOMIC_CHAR8_T_LOCK_FREE is not defined! >> +#endif > These aren't macros defined by C2X. You could argue that they are part of > the stable interface provided by GCC for e.g. libc implementations to use, > and so should be tested as such, but any such test shouldn't suggest it's > testing a standard feature (and should have a better name to describe what > it's actually testing rather than suggesting it's about predefined macros > in general). > Fair point. This test is redundant anyway; these macros are directly or indirectly exercised by the other tests. I'll just remove it. Tom.