* c-decl.c (start_enum): Set TYPE_PACKED consistently among type
variants.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224463
138bc75d-0d04-0410-961f-
82ee72b054a4
+2015-06-11 Jan Hubicka <hubicka@ucw.cz>
+
+ PR middle-end/66325
+ * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
+ variants.
+
2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
* c-decl.c (pop_scope): Register the main translation unit
the_enum->enum_overflow = 0;
if (flag_short_enums)
- TYPE_PACKED (enumtype) = 1;
+ for (tree v = TYPE_MAIN_VARIANT (enumtype); v; v = TYPE_NEXT_VARIANT (v))
+ TYPE_PACKED (v) = 1;
/* FIXME: This will issue a warning for a use of a type defined
within sizeof in a statement expr. This is not terribly serious