From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 3B9F738582A5 for ; Mon, 1 Aug 2022 19:13:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3B9F738582A5 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,208,1654588800"; d="scan'208";a="83320141" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 01 Aug 2022 11:13:14 -0800 IronPort-SDR: apvG86auRAW4w8rv6ewUWVyqkPx8YIauZt5GKH67mGCKVLr7wuOern/3/QV+hJz8aQDYP0AbNt VFOEV9t3uR1ufwAXvHYva27zn5cP4CoPN0wEh/G9djSsUEmdSHSjtNJOafIkuPkMr/6Efv6H4g M72q4uvWEwp9lGF+njBC+sHZ8SZq354DxmKbhGFe+4tg/p+iKZduPwekRL77p1RQ9/jp7TH8EX hZ2xxQ1Q7CWjv30iR0wdL+GmVZHyVJYQOKu5hDW9SXsoUj2OgNaRYk1F0KCoWXcqPuJM+opNDN W1E= Date: Mon, 1 Aug 2022 19:13:09 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Tom Honermann CC: Subject: Re: [PATCH 2/3 v2] testsuite: Add tests for C2X N2653 char8_t and UTF-8 string literal changes In-Reply-To: <20220801183414.1325381-1-tom@honermann.net> Message-ID: References: <20220725175948.1424695-3-tom@honermann.net> <20220801183414.1325381-1-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-08.mgc.mentorg.com (139.181.222.8) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3118.1 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: Mon, 01 Aug 2022 19:13:18 -0000 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). -- Joseph S. Myers joseph@codesourcery.com