8sa1-gcc/gcc/testsuite/g++.old-deja/g++.mike/enum1.C
Jeff Law 921e5a0eb4 Initial revision
From-SVN: r14840
1997-08-19 01:34:40 -06:00

12 lines
227 B
C

// Build don't link:
// Warn if a enum cannot fit into a small bit-field.
enum TypeKind { ATK, BTK, CTK, DTK } ;
struct Type {
enum TypeKind kind : 1; // WARNING -
void setBTK();
};
void Type::setBTK() { kind = DTK; }