C++ Logo

sg16

Advanced search

Re: [SG16] Just realized that the UCN is not a single character

From: Hubert Tong <hubert.reinterpretcast_at_[hidden]>
Date: Wed, 8 Apr 2020 19:13:59 -0400
On Wed, Apr 8, 2020 at 5:38 PM Jens Maurer <Jens.Maurer_at_[hidden]> wrote:

> On 08/04/2020 23.27, Hubert Tong via SG16 wrote:
> > Seems GCC is right again...
> >
> > \u0300, whether the result of forming a UCN or physically present as a
> UCN is a string of six characters from the basic source character set...
>
> So, it's six characters, so
>
> #define accent(x) x ## \u0300
>
> becomes
>
>
> #define accent(x) x ## \ u0300
>
> with \ a lone character and u0300 a separate preprocessing-token /
> identifier.
>
> Disturbing UCNs like that is really counter-intuitive.
> We should fix that.
>
Indeed, this seems to make some portion of the pp-identifier wording
necessary as a DR to C++11 to clarify whether how the constraints upon
identifiers affect max munch. The C wording places the restrictions on
combining characters into a "Semantics" section, so I don't think this is
an issue with C.


>
> Jens
>

Received on 2020-04-08 18:17:11