On 10/9/20 6:39 AM, JeanHeyd Meneide via Gcc-patches wrote:
> Hello,
>
>> Typo: comple-time
>>
>>> 2020-10-08 JeanHeyd "ThePhD" Meneide <phdoftheho...@gmail.com>
>>>
>>> * gcc/c-family/c-cppbuiltin.c: Add predefined macro
>>> definitions for charsets
>> I think you should put the macro names in braces after the filename and drop
>> the trailing "for charsets".
> Can do!
>
>>> * gcc/doc/cpp.texi: Document new predefined macro.
>>> * gcc/testsuite/c-c++-common/cpp/wide-narrow-predef-macros.c (new):
>> I think you should drop "(new)" above.
>> thanks,
> I saw that in previous changelogs, but I can change it! Fixed up
> the typos, too.
>
> Sincerely,
> JeanHeyd
>
> 2020-10-09 JeanHeyd "ThePhD" Meneide <phdoftheho...@gmail.com>
>
> * gcc/c-family/c-cppbuiltin.c: Add predefined
> {__GNUC_EXECUTION_CHARSET_NAME} and
> {__GNUC_WIDE_EXECUTION_CHARSET_NAME} macros
> * gcc/doc/cpp.texi: Document above new predefined macros
> * gcc/testsuite/c-c++-common/cpp/wide-narrow-predef-macros.c:
> New test for macro definitions to always exist and be strings
> * 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
>
> encoding_names.patch.txt
>
[ ... ]
> diff --git a/libcpp/charset.c b/libcpp/charset.c
> index 28b81c9c864..3e5578b1390 100644
> --- a/libcpp/charset.c
> +++ b/libcpp/charset.c
> @@ -638,6 +638,9 @@ init_iconv_desc (cpp_reader *pfile, const char *to, const
> char *from)
> char *pair;
> size_t i;
>
> + ret.to = to;
> + ret.from = from;
> +
AFAICT ret.from is never used. Is there a reason why you're saving it?
You use a getter function to retrieve the value of ret.to, which is
fine. Is there a specific reason why you're not using a setter function
to save the value?
Otherwise I think this is basically ready to be included.
jeff