2 // Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
3 // Contributed by Ben Elliston <bje@redhat.com>
5 // PR 80: Packed enums use minimum required storage.
7 extern "C" void abort();
9 enum numbers { one, two, three } __attribute__ ((packed)) nums;
10 enum colours { red = 1000, green, blue } __attribute__ ((packed)) cols;
11 enum conditions { fine, rain, cloudy } __attribute__ ((packed)) forecast;
16 if (sizeof (nums) != 1)
19 if (sizeof (cols) != 2)
22 if (sizeof (forecast) != 1)