This series of patches implements the core language features for the
WG14 N2653 [1] proposal to provide char8_t support in C. These changes
are intended to align char8_t support in C with the support provided in
C++20 via WG21 P0482R6 [2].
These patches addresses feedback provided in response to a previous
submission [3][4].
These changes do not impact default gcc behavior. Per prior feedback by
Joseph Myers, the existing -fchar8_t and -fno-char8_t options used to
opt-in to or opt-out of char8_t support in C++ are NOT reused for C.
Instead, the C related core language changes are enabled when targeting
C2x. Note that N2653 has not yet been accepted by WG14 for C2x, but the
patches enable these changes for C2x in order to avoid an additional
language dialect flag (e.g., -fchar8_t).
Patch 1: Language support
Patch 2: New tests
Tom.
[1]: WG14 N2653
"char8_t: A type for UTF-8 characters and strings (Revision 1)"
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2653.htm
[2]: WG21 P0482R6
"char8_t: A type for UTF-8 characters and strings (Revision 6)"
https://wg21.link/p0482r6
[3]: [PATCH 0/3]: C N2653 char8_t implementation
https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572022.html
[4]: [PATCH 1/3]: C N2653 char8_t: Language support
https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572023.html