public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: C++ patch ping
Date: Wed, 1 Sep 2021 15:25:17 -0400	[thread overview]
Message-ID: <e2ccd366-b980-c7b0-979d-e64aaf92d306@redhat.com> (raw)
In-Reply-To: <20210830071140.GJ920497@tucnak>

On 8/30/21 3:11 AM, Jakub Jelinek wrote:
> Hi!
> 
> I'd like to ping the following patches
> 
> libcpp: __VA_OPT__ p1042r1 placemarker changes [PR101488]
> https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575621.html
> together with your
> https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577602.html
> incremental patch (successfully tested on x86_64-linux and i686-linux).

OK, thanks.

> libcpp, v2: Implement C++23 P1949R7 - C++ Identifier Syntax using Unicode Standard Annex 31 [PR100977]
> https://gcc.gnu.org/pipermail/gcc-patches/2021-August/576854.html
> The incremental patch for splitting tokens at unsupported characters
> withdrawn, the above is the base patch.

My reply to that patch approved it with a suggestion for a tweak to 
ucn_valid_in_identifier.  Quoting it here:

>> @@ -998,6 +998,28 @@ ucn_valid_in_identifier (cpp_reader *pfi
>>       nst->previous = c;
>>     nst->prev_class = ucnranges[mn].combine;
>>   +  if (!CPP_PEDANTIC (pfile))
>> +    {
>> +      /* If not -pedantic, accept as character that may
>> +     begin an identifier a union of characters allowed
>> +     at that position in each of the character sets.  */
>> +      if ((ucnranges[mn].flags & (C99 | N99)) == C99
>> +      || (ucnranges[mn].flags & CXX) != 0
>> +      || (ucnranges[mn].flags & (C11 | N11)) == C11
>> +      || (ucnranges[mn].flags & (CXX23 | NXX23)) == CXX23)
>> +    return 1;
>> +      return 2;
>> +    }
>> +
>> +  if (CPP_OPTION (pfile, cxx23_identifiers))
>> +    invalid_start_flags = NXX23;
>> +  else if (CPP_OPTION (pfile, c11_identifiers))
>> +    invalid_start_flags = N11;
>> +  else if (CPP_OPTION (pfile, c99))
>> +    invalid_start_flags = N99;
>> +  else
>> +    invalid_start_flags = 0;
>> +
>>     /* In C99, UCN digits may not begin identifiers.  In C11 and C++11,
>>        UCN combining characters may not begin identifiers.  */
>>     if (ucnranges[mn].flags & invalid_start_flags)
> 
> I might check invalid_start_flags first, and return 1 if not set, then check all the other flags when not pedantic, and finally return 2 if nothing matches.  OK with or without this change. 

Jason


  reply	other threads:[~2021-09-01 19:25 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-30  7:11 Jakub Jelinek
2021-09-01 19:25 ` Jason Merrill [this message]
2021-09-01 20:11   ` Jakub Jelinek
2021-09-01 21:46     ` Jason Merrill
  -- strict thread matches above, loose matches on Subject: below --
2024-04-03  9:48 C++ Patch ping Jakub Jelinek
2024-03-08  8:56 [PATCH] c++: Fix constexpr evaluation of parameters passed by invisible reference [PR111284] Jakub Jelinek
2024-03-25 18:27 ` C++ Patch ping Jakub Jelinek
2024-03-06 14:12 C++ patch ping Jakub Jelinek
2023-09-19  7:19 Jakub Jelinek
2022-03-02  9:46 Jakub Jelinek
2021-08-16 17:37 C++ Patch ping Jakub Jelinek
2021-07-27 16:09 Jakub Jelinek
2021-01-05 16:34 Jakub Jelinek
2021-01-05 20:53 ` Jason Merrill
2020-12-03 13:59 C++ patch ping Jakub Jelinek
2020-11-09 19:24 Jakub Jelinek
2020-10-29 14:14 Jakub Jelinek
2020-03-16 15:45 C++ Patch ping Jakub Jelinek
2019-11-18 15:32 C++ patch ping Jakub Jelinek
2018-12-04 14:47 Jakub Jelinek
2018-12-06 21:43 ` Jason Merrill
2018-07-13 13:49 Jakub Jelinek
2018-07-13 16:24 ` Nathan Sidwell
2018-07-13 16:53   ` Jakub Jelinek
2018-07-13 16:42 ` Nathan Sidwell
2018-01-31 16:05 Jakub Jelinek
2018-01-02 15:12 Jakub Jelinek
2017-12-08 13:42 Jakub Jelinek
2017-09-27 10:05 Jakub Jelinek
2017-09-22 14:36 Jakub Jelinek
2017-02-06 14:13 Jakub Jelinek
2016-12-21 11:50 Jakub Jelinek
2016-12-15  8:38 C++ Patch Ping Jakub Jelinek
2016-12-15 12:26 ` Nathan Sidwell
2016-12-15 12:38   ` Jakub Jelinek
2016-12-15 12:48     ` Nathan Sidwell
2016-09-05 15:13 C++ patch ping Jakub Jelinek
2016-01-09  7:41 Jakub Jelinek
2016-01-11 20:01 ` Nathan Sidwell
2016-01-11 21:45   ` Jason Merrill
2016-01-11 21:52     ` Jakub Jelinek
2016-01-11 22:04       ` Jason Merrill
2016-01-11 23:53         ` Jakub Jelinek
2016-01-12  5:21           ` Jason Merrill
2008-04-28 20:18 Jakub Jelinek
2008-04-28 20:43 ` Mark Mitchell
2008-04-28 20:43   ` Jakub Jelinek
2008-04-28 20:59     ` Mark Mitchell
2005-02-11 14:44 Giovanni Bajo
2005-02-18 12:21 ` Mark Mitchell

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=e2ccd366-b980-c7b0-979d-e64aaf92d306@redhat.com \
    --to=jason@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@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).