public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nathan Sidwell <nathan@acm.org>
To: Mukesh Kapoor <mukesh.kapoor@oracle.com>, gcc-patches@gcc.gnu.org
Cc: jason@redhat.com
Subject: Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)
Date: Fri, 20 Oct 2017 18:00:00 -0000	[thread overview]
Message-ID: <58ca43f6-e0a6-0419-8e46-cbb6b78f845c@acm.org> (raw)
In-Reply-To: <6bd671aa-97cf-1dcc-ca90-5948ab533113@oracle.com>

On 10/20/2017 12:37 PM, Mukesh Kapoor wrote:
> Hi,
> 
> This patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80955.
> Handle user-defined literals correctly in lex_string(). An empty string 
> followed by an identifier is
> a valid user-defined literal. Don't issue a warning for this case.

a) why do we trigger on the definition of the operator function, and not 
on the use site?

b) Why is the empty string special cased?  Doesn't the same logic apply to:

int operator "bob"_zero (const char *, size_t) { return 0;}

(that'd be a syntactic error in the C++ parser of course)

nathan

-- 
Nathan Sidwell

  reply	other threads:[~2017-10-20 17:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-20 17:03 Mukesh Kapoor
2017-10-20 18:00 ` Nathan Sidwell [this message]
2017-10-20 18:19   ` Mukesh Kapoor
2017-10-20 20:56     ` Mukesh Kapoor
2017-10-24 14:07       ` Jason Merrill
2017-10-25  5:48         ` Mukesh Kapoor
2017-10-25 11:26           ` Nathan Sidwell
2017-10-25 16:13             ` Jason Merrill
2017-10-25 16:14               ` Mukesh Kapoor
2017-10-26  3:30             ` Mukesh Kapoor
2017-10-31 16:26               ` Mukesh Kapoor
2017-11-01 20:02                 ` Jason Merrill
2017-11-01 20:44                   ` Mukesh Kapoor
2017-11-02 14:42                     ` Jason Merrill
2017-11-03 14:31                       ` Paolo Carlini
2017-11-04 22:38                         ` Mukesh Kapoor
2017-11-06 10:30                           ` Paolo Carlini

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=58ca43f6-e0a6-0419-8e46-cbb6b78f845c@acm.org \
    --to=nathan@acm.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=mukesh.kapoor@oracle.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).