From: Jakub Jelinek <jakub@redhat.com>
To: Jason Merrill <jason@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: [PATCH] testsuite: Add testcase from C++23 P2314R4 - Character sets and encodings
Date: Fri, 4 Nov 2022 10:14:35 +0100 [thread overview]
Message-ID: <Y2TX+6SSEZw1fIsz@tucnak> (raw)
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
next reply other threads:[~2022-11-04 9:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 9:14 Jakub Jelinek [this message]
2022-11-04 17:18 ` Jason Merrill
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=Y2TX+6SSEZw1fIsz@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.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).