From: Tom Honermann <tom@honermann.net>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH 0/3] Implement C2X N2653 (char8_t) and correct UTF-8 character literal type in preprocessor directives for C++
Date: Mon, 25 Jul 2022 13:59:45 -0400 [thread overview]
Message-ID: <20220725175948.1424695-1-tom@honermann.net> (raw)
This patch series provides an implementation and tests for the WG14 N2653
paper as adopted for C2X.
Additionally, a fix is included for the C++ preprocessor to treat UTF-8
character literals in preprocessor directives as an unsigned type in char8_t
enabled modes (in C++17 and earlier with -fchar8_t or in C++20 or later
without -fno-char8_t).
Tom Honermann (3):
C: Implement C2X N2653 char8_t and UTF-8 string literal changes
testsuite: Add tests for C2X N2653 char8_t and UTF-8 string literal
changes
c++/106426: Treat u8 character literals as unsigned in char8_t modes.
gcc/c-family/c-lex.cc | 13 ++++--
gcc/c-family/c-opts.cc | 5 ++-
gcc/c/c-parser.cc | 16 ++++++-
gcc/c/c-typeck.cc | 2 +-
gcc/ginclude/stdatomic.h | 8 ++++
.../g++.dg/ext/char8_t-char-literal-1.C | 6 ++-
.../g++.dg/ext/char8_t-char-literal-2.C | 4 ++
.../atomic/c2x-stdatomic-lockfree-char8_t.c | 42 +++++++++++++++++++
.../atomic/gnu2x-stdatomic-lockfree-char8_t.c | 5 +++
gcc/testsuite/gcc.dg/c2x-predefined-macros.c | 11 +++++
gcc/testsuite/gcc.dg/c2x-utf8str-type.c | 6 +++
gcc/testsuite/gcc.dg/c2x-utf8str.c | 34 +++++++++++++++
.../gcc.dg/gnu2x-predefined-macros.c | 5 +++
gcc/testsuite/gcc.dg/gnu2x-utf8str-type.c | 5 +++
gcc/testsuite/gcc.dg/gnu2x-utf8str.c | 34 +++++++++++++++
libcpp/charset.cc | 4 +-
libcpp/include/cpplib.h | 4 +-
libcpp/init.cc | 1 +
18 files changed, 191 insertions(+), 14 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/atomic/c2x-stdatomic-lockfree-char8_t.c
create mode 100644 gcc/testsuite/gcc.dg/atomic/gnu2x-stdatomic-lockfree-char8_t.c
create mode 100644 gcc/testsuite/gcc.dg/c2x-predefined-macros.c
create mode 100644 gcc/testsuite/gcc.dg/c2x-utf8str-type.c
create mode 100644 gcc/testsuite/gcc.dg/c2x-utf8str.c
create mode 100644 gcc/testsuite/gcc.dg/gnu2x-predefined-macros.c
create mode 100644 gcc/testsuite/gcc.dg/gnu2x-utf8str-type.c
create mode 100644 gcc/testsuite/gcc.dg/gnu2x-utf8str.c
--
2.32.0
next reply other threads:[~2022-07-25 18:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 17:59 Tom Honermann [this message]
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
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=20220725175948.1424695-1-tom@honermann.net \
--to=tom@honermann.net \
--cc=gcc-patches@gcc.gnu.org \
/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).