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

A reduction capture must actually have reduction type #24

Open
nelsc opened this issue Feb 23, 2016 · 3 comments
Open

A reduction capture must actually have reduction type #24

nelsc opened this issue Feb 23, 2016 · 3 comments

Comments

@nelsc
Copy link
Contributor

nelsc commented Feb 23, 2016

The grammar for a reduction capture allows an arbitrary declarator. This makes it possible to write a reduction capture which looks like it declares a pointer-to-reduction, or array-of-reduction, or even function-returning-reduction.

@nelsc
Copy link
Contributor Author

nelsc commented Feb 23, 2016

These possibilities were never intended; consequently, the existing text doesn't actually say what happens if any kind of declarator derivation is attempted.

@nelsc
Copy link
Contributor Author

nelsc commented Feb 23, 2016

The simple solution would be to change the grammar to allow only an identifier instead of a declarator. This is not quite consistent with the way a bit-field declaration is handled.

@nelsc
Copy link
Contributor Author

nelsc commented Feb 23, 2016

I decided to go a different direction, less explicit, but consistent with the way member and bit-field declarations are described. (Members are described without reference to the specifiers in their declarations. Basically, they get their type and such just by virtue of the fact that a member declaration works like a declaration because it looks like a declaration.)

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