Skip to content

[lex.string] p7 Lacks the case that both have no "encoding-prefix" #5181

Description

@xmh0511

[lex.phases] p5

For a sequence of two or more adjacent string-literal tokens, a common encoding-prefix is determined as specified in [lex.string]. Each such string-literal token is then considered to have that common encoding-prefix.

[lex.phases] p5 only mentions two adjacent string-literal tokens, it didn't say either of them has an encoding-prefix. Hence, we should specify the complete situation in [lex.string] p7. The current [lex.string] p7 only explicitly specifies two cases

The common encoding-prefix for a sequence of adjacent string-literals is determined pairwise as follows: If two string-literals have the same encoding-prefix, the common encoding-prefix is that encoding-prefix. If one string-literal has no encoding-prefix, the common encoding-prefix is that of the other string-literal. Any other combinations are ill-formed.

It lacks the case

If two string-literals both have no encoding-prefix, they have no common encoding-prefix.

Activity

  1. frederick-vs-ja commented on Oct 15, 2024

    @frederick-vs-ja
    Contributor

    CWG2870

    This was fixed by #7099 (f368144).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions