[PATCH 1/3]: C N2653 char8_t: Language support
Joseph Myers
joseph@codesourcery.com
Mon Jun 7 21:11:20 GMT 2021
On Sun, 6 Jun 2021, Tom Honermann via Gcc-patches wrote:
> When -fchar8_t support is enabled for non-C++ modes, the _CHAR8_T_SOURCE macro
> is predefined. This is the mechanism proposed to glibc to opt-in to
> declarations of the char8_t typedef and c8rtomb and mbrtoc8 functions proposed
> in N2653. See [2].
I don't think glibc should have such a feature test macro, and I don't
think GCC should define such feature test macros either - _*_SOURCE macros
are generally for the *user* to define to decide what namespace they want
visible, not for the compiler to define. Without proliferating new
language dialects, __STDC_VERSION__ ought to be sufficient to communicate
from the compiler to the library (including to GCC's own headers such as
stdatomic.h).
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list