Dear GCC, This patch adds macros to the general preprocessor that allow users to understand what the execution and wide execution charsets are, which are used for "bark" and L"meow" literals in C-family languages. The goal of this is to enable individuals in capable languages like C and C++ to determine the encoding of string literals and, hopefully, transcode those literals to other encodings. For example, data stored in `char[]` on an IBM machine with EBCDIC can be (losslessly, or with a compile-time warning) transcoded to UTF-8 at constant-expression time in C++ with this patch, without having to use a series of complicated architecture and platform definitions to figure out what the encoding of string literals and wide character literals might be. The names are meaningful because they are tied directly to iconv, which means there is a strong reference between the name and the code that encodes/decodes a proper sequence. Therefore, we just present the names. Does this sound useful? Sincerely, JeanHeyd Patch notes: the strings passed to the charset creation routines are all static and/or allocated far at the beginning of the program and never deallocated until the end of the invocation, so it seems safe to just store a normal pointer to it. 2020-10-08 JeanHeyd "ThePhD" Meneide * gcc/c-family/c-cppbuiltin.c: Add predefined macro definitions for charsets * gcc/doc/cpp.texi: Document new predefined macro. * gcc/testsuite/c-c++-common/cpp/wide-narrow-predef-macros.c (new): New test for macro definitions to always exist. * libcpp/include/cpplib.h: Add functions declarations for retrieving charset names * libcpp/directives.c: Add function definitions to retrieve charset names. * libcpp/internal.h: Add to/from name preservations