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" }