C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] Adding $,@ and ` to C++: P2558R1

From: Steve Downey <sdowney_at_[hidden]>
Date: Wed, 11 May 2022 16:52:25 -0400
At least anymore. For C++ when the lexing nominally converted source
outside the basic character set to universal-character-name form, I think
it would be ambiguous in further lexing?

On Wed, May 11, 2022 at 4:49 PM Corentin <corentin.jabot_at_[hidden]> wrote:

> We should probably just get rid of the restriction that ucns cannot design
> basic character set member, it doesn't appear to be strongly motivated.
>
> On Wed, May 11, 2022, 22:25 Steve Downey via Liaison <
> liaison_at_[hidden]> wrote:
>
>> SG16, in reviewing the addition of the new characters to the basic
>> character set found a couple of awful ways it could result in conforming
>> code becoming non conforming.
>>
>> https://isocpp.org/files/papers/P2558R1.html
>>
>> #include <stdio.h> <https://isocpp.org/files/papers/P2558R1.html#cb2-2> <https://isocpp.org/files/papers/P2558R1.html#cb2-3>#define STR(x) #x <https://isocpp.org/files/papers/P2558R1.html#cb2-4> <https://isocpp.org/files/papers/P2558R1.html#cb2-5>int main() <https://isocpp.org/files/papers/P2558R1.html#cb2-6>{ <https://isocpp.org/files/papers/P2558R1.html#cb2-7> printf("%s", STR(\u0024)); // UCN for $ was allowed, now it is not <https://isocpp.org/files/papers/P2558R1.html#cb2-8>}
>> and
>>
>> #include <stdio.h> <https://isocpp.org/files/papers/P2558R1.html#cb3-2> <https://isocpp.org/files/papers/P2558R1.html#cb3-3>#define EAT(x) <https://isocpp.org/files/papers/P2558R1.html#cb3-4> <https://isocpp.org/files/papers/P2558R1.html#cb3-5>int main() <https://isocpp.org/files/papers/P2558R1.html#cb3-6>{ <https://isocpp.org/files/papers/P2558R1.html#cb3-7> EAT(\u0024) // UCN for $ was allowed, now it is not <https://isocpp.org/files/papers/P2558R1.html#cb3-8>}
>>
>> I am not sure this was noticed in reviewing N2701 but thought I'd bring
>> it to your attention.
>> SG16 had consensus to forward this to EWG.
>> _______________________________________________
>> Liaison mailing list
>> Liaison_at_[hidden]
>> Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/liaison
>> Link to this post: http://lists.isocpp.org/liaison/2022/05/1071.php
>>
>

Received on 2022-05-11 20:52:39