Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xmh0511 opened this issue Jan 4, 2022 · 0 comments
Open

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

xmh0511 opened this issue Jan 4, 2022 · 0 comments

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented Jan 4, 2022

[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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant