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

[over.literal] Mark use of a reserved identifier with 'error'. #4162

Merged
merged 1 commit into from Sep 18, 2020

Conversation

jensmaurer
Copy link
Member

Fixes #4048

@jensmaurer jensmaurer added this to the C++20 milestone Sep 16, 2020
@@ -4259,7 +4259,7 @@
float operator ""_e(const char*); // OK
float operator ""E(const char*); // error: reserved literal suffix~(\ref{usrlit.suffix}, \ref{lex.ext})
double operator""_Bq(long double); // OK: does not use the reserved identifier \tcode{_Bq}\iref{lex.name}
double operator"" _Bq(long double); // uses the reserved identifier \tcode{_Bq}\iref{lex.name}
double operator"" _Bq(long double); // error: uses the reserved identifier \tcode{_Bq}\iref{lex.name}
Copy link
Member

@zygoloid zygoloid Sep 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we say "error:" for "no diagnostic required" cases? I think we intentionally don't say "OK" or "error" here, because neither is guaranteed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least, we do two lines earlier for ""E.

In other cases, we say "ill-formed, no diagnostic required" in the example comment.
Let's excise "error" here.

with 'ill-formed, no diagnostic required'.
Also mark grammar terms as appropriate.
@jensmaurer
Copy link
Member Author

Fixed, rebased, and force-pushed.

@zygoloid zygoloid merged commit 4d8475d into cplusplus:master Sep 18, 2020
@jensmaurer jensmaurer deleted the c35 branch September 18, 2020 19:33
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

Successfully merging this pull request may close these issues.

Example in [over.literal]/8 misses the word error in one of its declarations
2 participants