public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] testsuite: Add testcase from C++23 P2314R4 - Character sets and encodings
@ 2022-11-04  9:14 Jakub Jelinek
  2022-11-04 17:18 ` Jason Merrill
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2022-11-04  9:14 UTC (permalink / raw)
  To: Jason Merrill; +Cc: gcc-patches

Hi!

I've read the paper and I believe we just implement it with no changes
needed (at least since PR67224 and similar libcpp changes in GCC 10),
but I could be wrong.

The following patch at least adds a testcase from the start of the paper.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

Do you agree that we can mark the paper as implemented or do you think
we need to change something (what?)?

2022-11-04  Jakub Jelinek  <jakub@redhat.com>

	* g++.dg/cpp23/charset1.C: New testcase from C++23 P2314R4.

--- gcc/testsuite/g++.dg/cpp23/charset1.C.jj	2022-11-03 10:56:48.114588796 +0100
+++ gcc/testsuite/g++.dg/cpp23/charset1.C	2022-11-03 10:56:39.162711201 +0100
@@ -0,0 +1,10 @@
+// P2314R4
+// { dg-do compile { target c++23 } }
+// { dg-options "-finput-charset=UTF-8 -fexec-charset=UTF-8" }
+
+#define S(x) # x
+const char s1[] = S(Köppe);       // "Köppe"
+const char s2[] = S(K\u00f6ppe);  // "Köppe"
+
+static_assert (sizeof (s1) == 7);
+static_assert (sizeof (s2) == 7);

	Jakub


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] testsuite: Add testcase from C++23 P2314R4 - Character sets and encodings
  2022-11-04  9:14 [PATCH] testsuite: Add testcase from C++23 P2314R4 - Character sets and encodings Jakub Jelinek
@ 2022-11-04 17:18 ` Jason Merrill
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Merrill @ 2022-11-04 17:18 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: gcc-patches

On 11/4/22 05:14, Jakub Jelinek wrote:
> Hi!
> 
> I've read the paper and I believe we just implement it with no changes
> needed (at least since PR67224 and similar libcpp changes in GCC 10),
> but I could be wrong.
> 
> The following patch at least adds a testcase from the start of the paper.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

OK.

> Do you agree that we can mark the paper as implemented or do you think
> we need to change something (what?)?

I agree.

> 2022-11-04  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* g++.dg/cpp23/charset1.C: New testcase from C++23 P2314R4.
> 
> --- gcc/testsuite/g++.dg/cpp23/charset1.C.jj	2022-11-03 10:56:48.114588796 +0100
> +++ gcc/testsuite/g++.dg/cpp23/charset1.C	2022-11-03 10:56:39.162711201 +0100
> @@ -0,0 +1,10 @@
> +// P2314R4
> +// { dg-do compile { target c++23 } }
> +// { dg-options "-finput-charset=UTF-8 -fexec-charset=UTF-8" }
> +
> +#define S(x) # x
> +const char s1[] = S(Köppe);       // "Köppe"
> +const char s2[] = S(K\u00f6ppe);  // "Köppe"
> +
> +static_assert (sizeof (s1) == 7);
> +static_assert (sizeof (s2) == 7);
> 
> 	Jakub
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-04 17:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-04  9:14 [PATCH] testsuite: Add testcase from C++23 P2314R4 - Character sets and encodings Jakub Jelinek
2022-11-04 17:18 ` Jason Merrill

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).