Skip to content

Use a named rather than anon struct in instance #1248

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

Merged
merged 1 commit into from
Jan 11, 2018

Conversation

jagerman
Copy link
Member

The anonymous struct nested in a union triggers a -Wnested-anon-type
warning ("anonymous types declared in an anonymous union are an
extension") under clang (#1204). This names the struct and defines it
out of the definition of instance to get around to warning (and makes
the code slightly simpler).

The anonymous struct nested in a union triggers a -Wnested-anon-type
warning ("anonymous types declared in an anonymous union are an
extension") under clang (pybind#1204).  This names the struct and defines it
out of the definition of `instance` to get around to warning (and makes
the code slightly simpler).
@jagerman
Copy link
Member Author

Cc @Psirus, @anntzer - I think this PR should avoid the warning, but confirmation would be nice before I merge it.

@anntzer
Copy link
Contributor

anntzer commented Jan 11, 2018

works for me, thanks!

@Psirus
Copy link

Psirus commented Jan 11, 2018

Same for me. Thank you very much.

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.

3 participants