From: Marek Polacek <polacek@redhat.com>
To: Jason Merrill <jason@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] c++: Reject UDLs in certain contexts [PR105300]
Date: Tue, 15 Nov 2022 19:35:48 -0500 [thread overview]
Message-ID: <Y3QwZEMLetXM7ho7@redhat.com> (raw)
In-Reply-To: <f532848a-bb39-0032-a625-4c4365de610f@redhat.com>
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 :/.
Marek
next prev parent reply other threads:[~2022-11-16 0:35 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 [this message]
2022-11-16 13:22 ` Jason Merrill
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=Y3QwZEMLetXM7ho7@redhat.com \
--to=polacek@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@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).