This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/21166] g++ gives error on reference to packed structure elements



------- Comment #3 from nathan at gcc dot gnu dot org  2005-11-28 10:34 -------
Subject: Bug 21166

Author: nathan
Date: Mon Nov 28 10:34:30 2005
New Revision: 107599

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107599
Log:
.:
        PR c++/21166
        * c-decl.c (finish_struct):  Only set DECL_PACKED on a field
        when its natural alignment is > BITS_PER_UNIT.
        * stor-layout.c (finalize_type_size): Revert my patch of 2005-08-08.
        * c-common.c (handle_packed_attribute): Ignore packing on a field
        whose type is naturally char aligned.
cp:
        PR c++/21166
        * class.c (check_field_decls): Only set DECL_PACKED on a field
        when its natural alignment is > BITS_PER_UNIT.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-common.c
    trunk/gcc/c-decl.c
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/class.c
    trunk/gcc/stor-layout.c


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]