[Issue 8355] struct's sizeof has bug

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jul 7 13:21:55 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8355


Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla at digitalmars.com
         Resolution|                            |INVALID


--- Comment #2 from Walter Bright <bugzilla at digitalmars.com> 2012-07-07 13:21:52 PDT ---
If you're using head, you'll need to put the align(1) inside the struct
declaration, rather than outside. The layout is now only affected by align
attributes that are inside the declaration. Align attributes outside affect how
the struct is aligned where the struct instance is placed.

I.e. this is an intentional change.

The previous behavior was broken in some respects, and was incompatible with
doing things like having 256 byte alignment. Furthermore, the specific behavior
of putting align outside and having it affect the inside was a bug.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list