From: Jason Merrill Date: Fri, 9 Apr 2010 15:19:17 +0000 (-0400) Subject: re PR c++/41788 (-Wpacked option changes the layout of packed non-POD structs) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=93e9807aa58db6181185ec664e23022ae2ce6725;p=gcc.git re PR c++/41788 (-Wpacked option changes the layout of packed non-POD structs) PR c++/41788 * stor-layout.c (finalize_record_size): Don't change TYPE_PACKED based on a warning flag. From-SVN: r158166 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d5aec72a36e..74eb521187c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-04-09 Jason Merrill + + PR c++/41788 + * stor-layout.c (finalize_record_size): Don't change TYPE_PACKED + based on a warning flag. + 2010-04-09 Richard Guenther * tree-pretty-print.c (dump_generic_node): Dump diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index ccae2201fe2..46ac3339803 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -1506,8 +1506,6 @@ finalize_record_size (record_layout_info rli) unpacked_size = round_up_loc (input_location, TYPE_SIZE (rli->t), rli->unpacked_align); if (simple_cst_equal (unpacked_size, TYPE_SIZE (rli->t))) { - TYPE_PACKED (rli->t) = 0; - if (TYPE_NAME (rli->t)) { tree name;