------- Comment #8 from nathan at gcc dot gnu dot org  2005-11-20 19:29 -------
I've come to the conclusion that my 21166 patch was overzealous.  What I now
think is that packing a decl always changes its type except for one case
described below.  Even when the field's placment happens to work out right, the
decl should remain packed (it's just an accident of placement, which is
fragile).

The exception should be were BITS_PER_UNIT == TYPE_ALIGN (TREE_TYPE (field)). 
Packing such a field is a no-op, so should not be reflected in the type system.
 We can place this check when we first attempt to set DECL_PACKED.

I think this is sufficient to fix the original problem 21166 was trying to
solve.


-- 

nathan at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |nathan at gcc dot gnu dot
                   |dot org                     |org
             Status|WAITING                     |ASSIGNED
   Last reconfirmed|2005-10-22 06:56:58         |2005-11-20 19:29:49
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23304

Reply via email to