This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Core status.
<cuchar> macrosSection: 27.5 [c.strings] Status: Core Submitter: Jason Merrill Opened: 2013-01-29 Last modified: 2026-06-10
Priority: 4
View other active issues in [c.strings].
View all other issues in [c.strings].
View all issues with Core status.
Discussion:
Apparently C1X changes __STDC_UTF_16__ and __STDC_UTF_32__ from macros
defined in uchar.h (and reflected in C++ by Table 79) to be predefined by the compiler.
Do we want to do the same?
[Brno 2026-06-09; Change status New → Core]
In C++14 these macros were defined in a table showing them as macros
in <cuchar>, and referring to the C Unicode TR,
ISO/IEC TR 19769:2004, where the macros were defined in the header.
But in the final C11 standard, the macros were predefined by the compiler
not in the header. So when C++17 rebased on C11 and referred to the uchar.h
from the C standard, we lost any reference to those macros.
An editorial change
for C++17 removed the table mentioning those macros,
following an arguably incorrect
editorial change
to "remove an outdated reference to the C Unicode TR".
Although uchar.h is in C11, we lost any mention of the macros by
saying that our uchar.h is the same as C uchar.h.
So those macros now have no existence at all in C++.
They're not inherited from the C version of uchar.h
and they're not predefined by a C++ compiler.
If we want to copy those macros from C, they should be in 15.12 [cpp.predefined], so Core should decide on that.
Proposed resolution: