Feature: Macros for identifying the wide and narrow execution string literal encoding
authorJeanHeyd Meneide <phdofthehouse@gmail.com>
Tue, 1 Dec 2020 21:39:47 +0000 (14:39 -0700)
committerJeff Law <law@redhat.com>
Tue, 1 Dec 2020 21:46:51 +0000 (14:46 -0700)
commiteccec8684142e05f2f92f0f5bd5b47dda3ba1529
treefe7097d15b7f8eaa5cfa1635f0783e1824908083
parent39836f8324d819459cb21198e95b993588c6a2b1
Feature: Macros for identifying the wide and narrow execution string literal encoding

gcc/c-family
* c-cppbuiltin.c (c_cpp_builtins): Add predefined
{__GNUC_EXECUTION_CHARSET_NAME} and
_WIDE_EXECUTION_CHARSET_NAME} macros.

gcc/
* doc/cpp.texi: Document new macros.

gcc/testsuite/
* c-c++-common/cpp/wide-narrow-predef-macros.c: New test.

libcpp/
* charset.c (init_iconv_desc): Initialize "to" and "from" fields.
* directives.c (cpp_get_narrow_charset_name): New function.
(cpp_get_wide_charset_name): Likewise.
* include/cpplib.h (cpp_get_narrow_charset_name): Prototype.
(cpp_get_wide_charset_name): Likewise.
* internal.h (cset_converter): Add "to" and "from" fields.
gcc/c-family/c-cppbuiltin.c
gcc/doc/cpp.texi
gcc/testsuite/c-c++-common/cpp/wide-narrow-predef-macros.c [new file with mode: 0644]
libcpp/charset.c
libcpp/directives.c
libcpp/include/cpplib.h
libcpp/internal.h