summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/enum5.C
blob: 3ebb02f757301a4d2ee0518cb0296db8908304fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/41127

#define CHAR_BIT 8
enum EE {ee};
typedef unsigned int T;

struct D {
        T : sizeof(unsigned int) * CHAR_BIT; // OK
        EE : sizeof(EE) * CHAR_BIT; // OK
        enum EE : sizeof(EE) * CHAR_BIT; // not OK
        enum EE xxxx : sizeof(EE) * CHAR_BIT; // OK
        T x : sizeof(unsigned int) * CHAR_BIT; // OK
        enum FF {ff} : sizeof(int) * CHAR_BIT; // OK
} element;

enum EE xx;
EE yy;