summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/enum1.C
blob: 35b1df0898ad8a9d3db4cb4dcc9e8c02686588f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
// { dg-do assemble  }
// Warn if a enum cannot fit into a small bit-field.

enum TypeKind { ATK, BTK, CTK, DTK } ;

struct Type {
  enum TypeKind kind : 1;		// { dg-warning "" } 
  void setBTK();
};

void Type::setBTK() { kind = DTK; } // { dg-warning "truncate" }