re PR c++/41788 (-Wpacked option changes the layout of packed non-POD structs)
authorJason Merrill <jason@redhat.com>
Fri, 9 Apr 2010 15:19:17 +0000 (11:19 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 9 Apr 2010 15:19:17 +0000 (11:19 -0400)
PR c++/41788
* stor-layout.c (finalize_record_size): Don't change TYPE_PACKED
based on a warning flag.

From-SVN: r158166

gcc/ChangeLog
gcc/stor-layout.c

index d5aec72a36eba79b4415b8624c851f43b4e7dba1..74eb521187c6a3ed26f7c13fcf6e54d76348bf2f 100644 (file)
@@ -1,3 +1,9 @@
+2010-04-09  Jason Merrill  <jason@redhat.com>
+
+       PR c++/41788
+       * stor-layout.c (finalize_record_size): Don't change TYPE_PACKED
+       based on a warning flag.
+
 2010-04-09  Richard Guenther  <rguenther@suse.de>
 
        * tree-pretty-print.c (dump_generic_node): Dump
index ccae2201fe270ce8c9c1ad746f8ad85605b7f92d..46ac33398034c8633cb439f5fbcef8cf876b6f7a 100644 (file)
@@ -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;