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