Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Ticket #22 (closed defect: worksforme)

Opened 1 year ago

Last modified 1 month ago

align attribute not fully implemented

Reported by: lindquist Assigned to:
Priority: major Milestone: Beta
Version: Keywords:
Cc:

Description

Currently the align attribute for structs is completely ignored. This seems to be a rather difficult D feature to translate to LLVM due to the differences in how the two handle alignment.

Not sure if this should be Alpha milestone, so not marking it as such, for now.

Change History

05/04/08 19:23:26 changed by lindquist

We probably just need to insert padding fields, llvm::TargetData should be able to help out. Also packed structs in llvm can be used for align(1): stuff...

07/28/08 09:41:58 changed by lindquist

After reading the spec on this again, I'm not convinced it's worth the effort to implement, if we could even find the info on how our "companion C compiler" does things here.

I'd say a pragma for guaranteed alignment of the struct type itself, as well as fields (aligned offsets?), would be much more useful.

For example:

pragma(alignment, 16)
  struct SSEVec{ float x,y,z,w; }

07/30/08 09:36:33 changed by lindquist

rev [435] implements the align(1) special case. other alignments are still ignored.

07/30/08 09:39:52 changed by lindquist

  • summary changed from align attribute not honored to align attribute not fully implemented.

08/03/08 09:30:17 changed by lindquist

  • milestone set to Beta.

10/22/08 11:51:04 changed by lindquist

  • status changed from new to closed.
  • resolution set to worksforme.

Closing this one. If someone has alignment problems they can reopen it or file a new, more specific ticket.

Copyright © 2008, LDC Development Team.