public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Implement C2X N2653 (char8_t) and correct UTF-8 character literal type in preprocessor directives for C++
@ 2022-08-02 18:36 Tom Honermann
  2022-08-02 18:36 ` [PATCH v4 1/2] C: Implement C2X N2653 char8_t and UTF-8 string literal changes Tom Honermann
  2022-08-02 18:36 ` [PATCH v4 2/2] preprocessor/106426: Treat u8 character literals as unsigned in char8_t modes Tom Honermann
  0 siblings, 2 replies; 7+ messages in thread
From: Tom Honermann @ 2022-08-02 18:36 UTC (permalink / raw)
  To: gcc-patches

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 (2):
  C: Implement C2X N2653 char8_t and UTF-8 string literal changes
  preprocessor/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                      |  6 +++
 .../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/c11-utf8str-type.c       |  6 +++
 gcc/testsuite/gcc.dg/c17-utf8str-type.c       |  6 +++
 gcc/testsuite/gcc.dg/c2x-utf8str-type.c       |  6 +++
 gcc/testsuite/gcc.dg/c2x-utf8str.c            | 34 +++++++++++++++
 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, 185 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/c11-utf8str-type.c
 create mode 100644 gcc/testsuite/gcc.dg/c17-utf8str-type.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-utf8str-type.c
 create mode 100644 gcc/testsuite/gcc.dg/gnu2x-utf8str.c

-- 
2.32.0


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

end of thread, other threads:[~2022-08-08 20:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02 18:36 [PATCH v4 0/2] Implement C2X N2653 (char8_t) and correct UTF-8 character literal type in preprocessor directives for C++ Tom Honermann
2022-08-02 18:36 ` [PATCH v4 1/2] C: Implement C2X N2653 char8_t and UTF-8 string literal changes Tom Honermann
2022-08-02 22:10   ` Joseph Myers
2022-08-02 18:36 ` [PATCH v4 2/2] preprocessor/106426: Treat u8 character literals as unsigned in char8_t modes Tom Honermann
2022-08-02 22:14   ` Joseph Myers
2022-08-08 13:45     ` Tom Honermann
2022-08-08 20:01       ` Joseph Myers

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