public inbox for gcc-rust@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Arthur Cohen <arthur.cohen@embecosm.com>
Cc: gcc-patches@gcc.gnu.org, tromey@redhat.com, gcc-rust@gcc.gnu.org,
	Raiki Tamura <tamaron1203@gmail.com>
Subject: Re: [PATCH] libcpp: add function to check XID properties
Date: Fri, 8 Sep 2023 15:09:22 +0200	[thread overview]
Message-ID: <ZPsdApFFkD7sTNer@tucnak> (raw)
In-Reply-To: <20230908125840.789518-1-arthur.cohen@embecosm.com>

On Fri, Sep 08, 2023 at 02:58:40PM +0200, Arthur Cohen wrote:
> From: Raiki Tamura <tamaron1203@gmail.com>
> 
> libcpp/ChangeLog:
> 
> 	* charset.cc (check_xid_property):new function to check XID_Start and XID_Continue
> 	* include/cpplib.h (check_xid_property):add enum representing XID properties

Just random comments, not a proper review.
1) functions exported from libcpp should IMNSHO use the cpp_ prefix
2) similarly the enumerators should be prefixed with CPP_
3) formatting of the ChangeLog entry is incorrect.  There should be a space
after ): followed by uppercase rather than lowercase letter, descriptions
should end with . and there should be line wrapping so that it fits into 80
columns.  For a new function, one can just say New. or New function.,
doesn't need to describe what it is good for.  And the include/cpplib.h
changes don't describe what actually changed.  A new anonymous enum (why not
a named one?) was added, and check_xid_property declared.

> --- a/libcpp/include/cpplib.h
> +++ b/libcpp/include/cpplib.h
> @@ -1606,4 +1606,11 @@ bool cpp_valid_utf8_p (const char *data, size_t num_bytes);
>  bool cpp_is_combining_char (cppchar_t c);
>  bool cpp_is_printable_char (cppchar_t c);
>  
> +enum {
> +   XID_START = 1,
> +   XID_CONTINUE = 2

Formatting.  There should be indentation just by 2 columns rather than 3.

	Jakub


  reply	other threads:[~2023-09-08 13:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-08 12:58 Arthur Cohen
2023-09-08 13:09 ` Jakub Jelinek [this message]
2023-09-08 14:25   ` [PATCH v2] " Arthur Cohen
2023-09-08 14:59   ` [PATCH v3] " Arthur Cohen
2023-10-16 15:02     ` Arthur Cohen
2023-12-18 19:00     ` Joseph Myers
2024-01-04 15:22       ` Arthur Cohen

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=ZPsdApFFkD7sTNer@tucnak \
    --to=jakub@redhat.com \
    --cc=arthur.cohen@embecosm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc-rust@gcc.gnu.org \
    --cc=tamaron1203@gmail.com \
    --cc=tromey@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).