public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: JeanHeyd Meneide <phdofthehouse@gmail.com>,
	Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: JeanHeyd Meneide via Gcc-patches <gcc-patches@gcc.gnu.org>,
	Joseph Myers <joseph@codesourcery.com>
Subject: Re: [ Preprocessor ] [ Common ] Feature: Macros for identifying the wide and narrow execution string literal encoding
Date: Mon, 23 Nov 2020 13:02:28 -0700	[thread overview]
Message-ID: <7dd57cee-bc5b-d68c-ca89-d70bc7ebbc7f@redhat.com> (raw)
In-Reply-To: <CANHA4OjLqvj0Pb-1HvfzmO+cCnrWKjXn9v23E0+Zb0HiDNmxSA@mail.gmail.com>



On 10/9/20 6:39 AM, JeanHeyd Meneide via Gcc-patches wrote:
> Hello,
>
>> Typo:  comple-time
>>
>>> 2020-10-08  JeanHeyd "ThePhD" Meneide  <phdofthehouse@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  <phdofthehouse@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


  parent reply	other threads:[~2020-11-23 20:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08 11:52 JeanHeyd Meneide
2020-10-08 17:36 ` Joseph Myers
2020-10-08 21:39   ` JeanHeyd Meneide
2020-10-09 11:19     ` Bernhard Reutner-Fischer
2020-10-09 12:39       ` JeanHeyd Meneide
2020-10-30  0:22         ` JeanHeyd Meneide
2020-11-23 20:02         ` Jeff Law [this message]
2020-11-23 20:40           ` JeanHeyd Meneide
2020-12-01 21:47             ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7dd57cee-bc5b-d68c-ca89-d70bc7ebbc7f@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=phdofthehouse@gmail.com \
    --cc=rep.dot.nop@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).