From: Jason Merrill <jason@redhat.com>
To: Marek Polacek <polacek@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] c++: Reject UDLs in certain contexts [PR105300]
Date: Wed, 16 Nov 2022 08:22:39 -0500 [thread overview]
Message-ID: <95aefa6c-5460-3e40-1e07-c2ebd39e3559@redhat.com> (raw)
In-Reply-To: <Y3QwZEMLetXM7ho7@redhat.com>
On 11/15/22 19:35, Marek Polacek wrote:
> On Tue, Nov 15, 2022 at 06:58:39PM -0500, Jason Merrill wrote:
>> On 11/12/22 06:53, Marek Polacek wrote:
>>> In this PR, we are crashing because we've encountered a UDL where a
>>> string-literal is expected. This patch makes the parser reject string
>>> and character UDLs in all places where the grammar requires a
>>> string-literal and not a user-defined-string-literal.
>>>
>>> Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk?
>>
>> Since the grammar has
>>
>> user-defined-string-literal :
>> string-literal ud-suffix
>>
>> maybe we want to move the UDL handling out to a cp_parser_udl_string_literal
>> that calls cp_parser_string_literal?
>
> Umm, maybe, but the UDL handling code seems to be too entrenched in
> cp_parser_string_literal and I don't think it's going to be easy to extract
> it :/.
Fair enough; maybe a wrapper, then?
Jason
next prev parent reply other threads:[~2022-11-16 13:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-12 16:53 Marek Polacek
2022-11-15 23:58 ` Jason Merrill
2022-11-16 0:35 ` Marek Polacek
2022-11-16 13:22 ` Jason Merrill [this message]
2022-11-17 1:12 ` Marek Polacek
2022-11-18 0:06 ` Jason Merrill
2022-11-18 23:52 ` [PATCH v2] " Marek Polacek
2022-11-19 1:39 ` Jason Merrill
2022-12-02 23:58 ` [PATCH v3] " Marek Polacek
2022-12-03 19:58 ` Jason Merrill
2023-01-13 23:22 ` [PATCH v4] " Marek Polacek
2023-01-24 22:49 ` Marek Polacek
2023-01-25 19:36 ` Jason Merrill
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=95aefa6c-5460-3e40-1e07-c2ebd39e3559@redhat.com \
--to=jason@redhat.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).