public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tom Honermann <tom@honermann.net>
To: Joseph Myers <joseph@codesourcery.com>
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: Sun, 31 Jul 2022 17:47:20 -0400	[thread overview]
Message-ID: <9c30e383-cab1-c996-ab4b-23b5a071167d@honermann.net> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2207272320580.564321@digraph.polyomino.org.uk>

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.


  reply	other threads:[~2022-07-31 21:47 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
2022-07-31 21:47     ` Tom Honermann [this message]
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=9c30e383-cab1-c996-ab4b-23b5a071167d@honermann.net \
    --to=tom@honermann.net \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    /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).