From: Martin Sebor <msebor@gmail.com>
To: Marek Polacek <polacek@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] c++: Fix spelling of non-static
Date: Thu, 7 May 2020 12:49:28 -0600 [thread overview]
Message-ID: <5bb4b0df-5ec1-2c96-fd62-897ab7a45705@gmail.com> (raw)
In-Reply-To: <20200507184443.GG4475@redhat.com>
On 5/7/20 12:44 PM, Marek Polacek wrote:
> On Thu, May 07, 2020 at 12:34:44PM -0600, Martin Sebor wrote:
>> On 5/7/20 11:24 AM, Marek Polacek wrote:
>>> On Thu, Mar 19, 2020 at 12:51:42PM -0400, Marek Polacek via Gcc-patches wrote:
>>>> On Thu, Mar 19, 2020 at 10:45:01AM -0600, Martin Sebor via Gcc-patches wrote:
>>>>> On 3/19/20 9:48 AM, Marek Polacek via Gcc-patches wrote:
>>>>>> I was looking at DR 296 and noticed that we say "nonstatic" instead of
>>>>>> "non-static", which is the version the standard uses. So this patch
>>>>>> fixes the spelling throughout the front end. Did not check e.g.
>>>>>> non-dependent or any other.
>>>>>>
>>>>>> Bootstrapped/regtested on x86_64-linux, ok for trunk?
>>>>>
>>>>> If this is the spelling we want to standardize on, would you mind
>>>>> adding a check to -Wformat-diag as well so these misspellings get
>>>>> diagnosed in diagnostic messages? We might also want to add
>>>>> a mention of it to the Spelling section of the GCC Coding
>>>>> Conventions.
>>>>
>>>> Good point, I can definitely add it. For now I'm putting this aside though.
>>>
>>> Actually, I wasn't sure where to add such a diagnostic, check_plain doesn't seem
>>> to already check for similar typos, so I'll just go ahead with my patch as-is.
>>
>> Thanks for remembering this! I think the word should be added to
>> the badwords array (above "non-static"). But I can do that if you
>> prefer. Looks like I'll be doing some work in this space anyway.
>
> Oof, how did I miss that? Does this patch look OK to you then?
> Not sure if it deserves a test, I would think not.
Looks good to me. (Despite the contrast with nonzero ;)
Thanks again!
Martin
>
> * c-format.c (badwords): Add "nonstatic".
> ---
> gcc/c-family/c-format.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/gcc/c-family/c-format.c b/gcc/c-family/c-format.c
> index 33a5b6d3965..77d24ad94e4 100644
> --- a/gcc/c-family/c-format.c
> +++ b/gcc/c-family/c-format.c
> @@ -2997,6 +2997,7 @@ static const struct
> NAME ("decl", "declaration"),
> NAME ("enumeral", "enumerated"),
> NAME ("floating point", "floating-point"),
> + NAME ("nonstatic", "non-static"),
> NAME ("non-zero", "nonzero"),
> NAME ("reg", "register"),
> NAME ("stmt", "statement"),
>
> base-commit: 5d5dcc65aae1024da31e0e9cae6a8966461037e8
>
prev parent reply other threads:[~2020-05-07 18:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-19 15:48 Marek Polacek
2020-03-19 16:26 ` Jason Merrill
2020-03-19 16:45 ` Martin Sebor
2020-03-19 16:51 ` Marek Polacek
2020-05-07 17:24 ` Marek Polacek
2020-05-07 18:34 ` Martin Sebor
2020-05-07 18:44 ` Marek Polacek
2020-05-07 18:49 ` Martin Sebor [this message]
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=5bb4b0df-5ec1-2c96-fd62-897ab7a45705@gmail.com \
--to=msebor@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=polacek@redhat.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).