From: Neil Booth <neil@daikokuya.co.uk>
To: "Martin v. L?wis" <loewis@informatik.hu-berlin.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: Implementing Universal Character Names in identifiers
Date: Thu, 07 Nov 2002 11:40:00 -0000 [thread overview]
Message-ID: <20021107194030.GA17959@daikokuya.co.uk> (raw)
In-Reply-To: <j4u1it1zjz.fsf@informatik.hu-berlin.de>
Martin v. L?wis wrote:-
> I think UCNs are rightfully different from nearly everything else;
> they are quite similar to multi-byte characters. If you have an
> escaped newline in the middle of a multi-byte character, you would not
> expect concatenation to create a new multi-byte character, either,
> would you?
It's not analogous. The idiom is that an escaped newline between
characters in the source character set are invisible. You are
proposing breaking that idiom. Multibyte chars are single chars
in the source character set, and so your counterexample does not apply.
The UCN stuff is really a phase 3 thing; escaped newlines are phase 2.
I really want this implemented in whatever patch goes in. It's not
hard to do; instead of reading chars directly through a pointer,
call get_effective_char() instead, like the other parts of cpplex.c do.
It handles skipping the escaped newlines, if any.
> I cannot see any important use cases for such a
> feature. Implementations are allowed to reject this case, and it
> simplifies the implementation to reject it, so I can see really no
> reason to make life more complicated than necessary. Producing an
> error now still gives the opportunity to provide an extension later.
EDG accepts escaped newlines in UCNs; I've just tried it, so it's not
without precedent.
> > A backslash is a token; so is u00c0. Your example is indeed an
> > error, but was not what I had in mind. I suspect pasting just works,
> > anyway.
>
> Can you please give an example for what you had in mind?
#define f(x, y) x ## y
f(\, uc00c0)
Which reminds me, the anti-accidental-paste code might need an extra
line or two.
Neil.
next prev parent reply other threads:[~2002-11-07 19:40 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-27 23:15 Martin v. Löwis
2002-10-27 23:47 ` Fergus Henderson
2002-10-28 0:11 ` Martin v. Löwis
2002-10-27 23:51 ` Zack Weinberg
2002-10-28 0:53 ` Martin v. Löwis
2002-10-28 1:30 ` Fergus Henderson
2002-10-28 2:26 ` Joseph S. Myers
2002-10-28 3:29 ` Martin v. Löwis
2002-10-28 10:39 ` Zack Weinberg
2002-10-28 10:53 ` Joseph S. Myers
2002-10-29 1:39 ` Martin v. Löwis
2002-10-29 12:04 ` Joseph S. Myers
2002-10-31 11:08 ` Tom Tromey
2002-11-01 1:41 ` Martin v. Löwis
2002-11-01 11:17 ` Tom Tromey
2002-11-01 11:57 ` Martin v. Löwis
2002-11-01 14:56 ` Tom Tromey
2002-11-01 14:59 ` Andrew Pinski
2002-11-03 6:08 ` Martin v. Löwis
2002-11-03 6:05 ` Martin v. Löwis
2002-11-10 10:39 ` Neil Booth
2002-11-11 8:36 ` Martin v. Löwis
2002-11-07 0:09 ` Neil Booth
2002-11-07 0:12 ` Neil Booth
2002-11-07 1:01 ` Martin v. Löwis
2002-11-07 1:11 ` Neil Booth
2002-11-07 1:47 ` Martin v. Löwis
2002-11-07 11:40 ` Neil Booth [this message]
2002-11-08 3:51 ` Martin v. Löwis
2002-11-08 11:45 ` Neil Booth
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=20021107194030.GA17959@daikokuya.co.uk \
--to=neil@daikokuya.co.uk \
--cc=gcc-patches@gcc.gnu.org \
--cc=loewis@informatik.hu-berlin.de \
/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).