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

Explicit alignment in the type system #4578

Closed
ghost opened this issue Jan 22, 2013 · 10 comments
Closed

Explicit alignment in the type system #4578

ghost opened this issue Jan 22, 2013 · 10 comments
Labels
A-typesystem Area: The type system P-low Low priority

Comments

@ghost
Copy link

ghost commented Jan 22, 2013

See http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1507.htm and http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1397.htm

@Aatch
Copy link
Contributor

Aatch commented Apr 29, 2013

Marking as maturity 4 since alignment is useful, but not required. Adding it should be backwards compatible unless it (for some reason) changes alignment rules.

@emberian
Copy link
Member

emberian commented Aug 5, 2013

Nominating for production ready

@emberian
Copy link
Member

emberian commented Aug 5, 2013

This would probably be implemented using intrinsics and attributes, rather than requiring language changes, I think.

@graydon
Copy link
Contributor

graydon commented Aug 8, 2013

This is tangled up with the question of constant expressions. #5551

@graydon
Copy link
Contributor

graydon commented Aug 8, 2013

accepted for feature-complete milestone

@thestinger
Copy link
Contributor

I think we would need the ability to add attributes to variable declarations for this to be practical.

@nikomatsakis
Copy link
Contributor

Seems like being able to specify specific alignments on struct types would be sufficient.

@pnkfelix
Copy link
Member

pnkfelix commented Feb 6, 2014

Not a 1.0 blocker, P-low. (We think it sufficent to be able to put such attributes on struct fields and/or struct items themselves; if you need a stack local aligned, wrap it in such a struct.)

@thestinger
Copy link
Contributor

#14006 implements proper alignment handling for heap allocations, so it's a lot more feasible to implement this as a property of types now.

@rust-highfive
Copy link
Collaborator

This issue has been moved to the RFCs repo: rust-lang/rfcs#282

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-typesystem Area: The type system P-low Low priority
Projects
None yet
Development

No branches or pull requests

7 participants