public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Tom Honermann <tom@honermann.net>
Cc: <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 2/3] testsuite: Add tests for C2X N2653 char8_t and UTF-8 string literal changes
Date: Wed, 27 Jul 2022 23:23:04 +0000	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2207272320580.564321@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20220725175948.1424695-3-tom@honermann.net>

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

  reply	other threads:[~2022-07-27 23:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25 17:59 [PATCH 0/3] Implement C2X N2653 (char8_t) and correct UTF-8 character literal type in preprocessor directives for C++ Tom Honermann
2022-07-25 17:59 ` [PATCH 1/3] C: Implement C2X N2653 char8_t and UTF-8 string literal changes Tom Honermann
2022-07-27 23:20   ` Joseph Myers
2022-07-30 23:17     ` Tom Honermann
2022-08-01 18:32   ` [PATCH 1/3 v2] " Tom Honermann
2022-07-25 17:59 ` [PATCH 2/3] testsuite: Add tests for " Tom Honermann
2022-07-27 23:23   ` Joseph Myers [this message]
2022-07-31 21:47     ` Tom Honermann
2022-08-01 18:34   ` [PATCH 2/3 v2] " Tom Honermann
2022-08-01 19:13     ` Joseph Myers
2022-08-01 22:36       ` Tom Honermann
2022-08-01 22:39   ` [PATCH 2/3 v3] " Tom Honermann
2022-08-02 16:53     ` Joseph Myers
2022-08-02 18:02       ` Tom Honermann
2022-07-25 17:59 ` [PATCH 3/3] c++/106426: Treat u8 character literals as unsigned in char8_t modes Tom Honermann
2022-07-25 18:05   ` Andrew Pinski
2022-07-26  1:32     ` [PATCH 3/3 v2] preprocessor/106426: " Tom Honermann
2022-07-26  1:38     ` [PATCH 3/3] c++/106426: " Tom Honermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2207272320580.564321@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tom@honermann.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).