aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/enum11.C
blob: fda718b4f7ef6f2ae9ee9ce07a80b8711e0be18d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do assemble  }
// GROUPS passed enums
class X
{
    enum
    {
       oneMask = 0x0000FFFF,
       twoMask  = 0x000F0000,
       thiMask = 0xFFF00000, // { dg-error "comma at end" "" { target { ! c++11 } } }
    };
    unsigned int foo;

public:
    X (int) : foo (oneMask | twoMask ) {}               // No warning
    X ()    : foo (oneMask | twoMask | thiMask) {}      // Warning
};