public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: Tom Tromey <tromey@redhat.com>, Jason Merrill <jason@redhat.com>,
	        gcc-patches@gcc.gnu.org,
	Kris Van Hees <kris.van.hees@oracle.com>,
	        Ulrich Drepper <drepper@redhat.com>
Subject: Re: [PATCH] Support for C++0x and C1x u8 string literals and raw string literals
Date: Fri, 12 Sep 2008 21:00:00 -0000	[thread overview]
Message-ID: <20080912200354.GD9666@hs20-bc2-1.build.redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0809121940120.19769@digraph.polyomino.org.uk>

On Fri, Sep 12, 2008 at 07:53:04PM +0000, Joseph S. Myers wrote:
> On Fri, 12 Sep 2008, Jakub Jelinek wrote:
> 
> > UCNs aren't valid in d-char-sequence though, only in normal strings and within
> > r-char-sequence.
> 
> However, backslash is valid in d-char-sequence, and so are all the other 
> characters making up UCNs.  The way I read N2723 is that in phase 1 each @ 
> chararcter is converted to either \u0040 or \U00000040, then in phase 3 
> that sequence of characters may end up being interpreted as something 
> other than a UCN.  If a sequence matching UCN syntax is produced by 
> deleting backslash-newline, that's undefined in C++ (unlike in C), but 
> what's not mentioned as undefined is a UCN from stage 1 not being 
> interpreted as a UCN in stage 3 - whether through being in a 
> d-char-sequence or for any other reason.  Certainly writing \u0040 
> directly in a d-char-sequence would appear to be valid.

If it is up to the implementation to choose between \u0040 and \U00000040,
then writing R"@@[]@@"; would be either valid or invalid, depending
on whether the implementation has replaced it by \u0040 or \U00000040 (as in
the latter case it is 2 x 10 characters, more than 16 char limit for
d-char-sequence).

	Jakub

  reply	other threads:[~2008-09-12 20:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-12 14:22 Jakub Jelinek
2008-09-12 16:52 ` Joseph S. Myers
2008-09-12 19:40   ` Jakub Jelinek
2008-09-12 20:16     ` Joseph S. Myers
2008-09-12 21:00       ` Jakub Jelinek [this message]
2008-09-12 21:04         ` Joseph S. Myers

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=20080912200354.GD9666@hs20-bc2-1.build.redhat.com \
    --to=jakub@redhat.com \
    --cc=drepper@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=kris.van.hees@oracle.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).