1 // { dg-do assemble  }
2 // GROUPS passed enums
3 // enum file
4 // From: polstra!jdp@uunet.uu.net (John Polstra)
5 // Date:     Mon, 15 Nov 93 12:14 PST
6 // Subject:  GCC 2.5.3 Enum Bitfield Causes Bogus Warning
7 // Message-ID: <m0ozAJo-0001EgC@seattle.polstra.uucp>
8 
9    enum Color { Red, Green, Blue };
10 
11     struct S {
12         Color c : 8;
13     } s;
14 
foo()15     void foo()
16     {
17         s.c = Red;      // <== This statement produces the warning message.
18     }
19 
20