On 28/03/2021 22.56, Alisdair Meredith wrote:
> Thanks - that was exactly my thoughts, and I missed it when Corentin tried to correct me. All clear now, although is the reference to Raw string literals still useful, or more likely to lead to folks like me mid reading too quickly, and getting confused?
>
> I believe there would be no cha he of behavior if we strike the “except” that can no longer occur.
No. If we strike the "except", we give the impression that a spliced character
sequence in a raw string literal that looks like a UCN is somehow special,
and would cause undefined behavior. It doesn't.
We should strike
> if a splice results in a character sequence that matches the syntax of a universal-character-name, the behavior is undefined. Both because it matches existing practices (except msvc) and because it follows the flow of the wording. (ucn are replaced in the next phase)
What should happen when a ucn is formed by a preprocessor in phase 4 is less clear to me.
> If a ' or a " character matches the last category, the behavior is undefined
That should be ill-formed, which is what all compilers do. I suspect this specific undefined behavior is an artifact of C wording