* stor-layout.c (place_field): Don't warn about unnecessary DECL_PACKED
if the type is packed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157013
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-02-23 Jason Merrill <jason@redhat.com>
+
+ PR c++/42837
+ * stor-layout.c (place_field): Don't warn about unnecessary
+ DECL_PACKED if the type is packed.
+
2010-02-23 Jakub Jelinek <jakub@redhat.com>
PR target/43139
if (STRICT_ALIGNMENT)
warning (OPT_Wattributes, "packed attribute causes "
"inefficient alignment for %q+D", field);
- else
+ /* Don't warn if DECL_PACKED was set by the type. */
+ else if (!TYPE_PACKED (rli->t))
warning (OPT_Wattributes, "packed attribute is "
"unnecessary for %q+D", field);
}