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

[expr.unary.op] does not handle non-lvalue qualified-ids #2919

Closed
jensmaurer opened this issue Jun 6, 2019 · 0 comments · Fixed by #2922
Closed

[expr.unary.op] does not handle non-lvalue qualified-ids #2919

jensmaurer opened this issue Jun 6, 2019 · 0 comments · Fixed by #2922
Assignees

Comments

@jensmaurer
Copy link
Member

[expr.unary.op] p3 does not properly handle a case like this:

enum E { e };
int x = &E::e, 0;

&E::e is a qualified-id, so the "shall" conditions are satisfied, yet &E::e is obviously nonsense.
Suggestion: Drop the initial "shall" sentence, make the regular pointer case dependent on getting an lvalue, and add a trailing "Otherwise, the program is ill-formed."

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 a pull request may close this issue.

1 participant