blob: 2f7a6dd438abf2cc5c2c15e5dd14093c35c72bed [file] [log] [blame]
// { 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 "conversion from '\[^\n\r]+' to .unsigned char:1. changes value from" }