Skip to content

Defining unions (RFC 1444)? #303

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

Closed
kamalmarhubi opened this issue May 31, 2016 · 3 comments
Closed

Defining unions (RFC 1444)? #303

kamalmarhubi opened this issue May 31, 2016 · 3 comments

Comments

@kamalmarhubi
Copy link
Contributor

RFC 1444 was accepted a few weeks ago, bringing us actual real support for unions. Will libc grow to support for unions in its struct definitions?

The big issue I see for it is the RFC doesn't add unnamed unions, which covers most if not all of the unions we have in libc. At the same time, it'd be really great to not have to define the unions in client code, and to have libc's stronger testing applied to them.

The other issue I see is Rust version compatibility. I'll open another issue for that.

@alexcrichton
Copy link
Member

Certainly! We may not be able to change existing types but we can certainly add more! This is mostly just covered by the version policy, so I'm gonna close in favor of that.

(also just waiting on unions to get implemented...)

@kamalmarhubi
Copy link
Contributor Author

We may not be able to change existing types

I'd argue for a semver incompatible bump to include proper definitions, even for existing types. Depending on how various bitfield RFCs are going, this bump could perhaps wait to encompass both.

@alexcrichton
Copy link
Member

Ah yeah that'd also work, but a semver bump of libc is not to be taken lightly, we wouldn't want to do it just for that.

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

2 participants