//PR c++/28053 struct X {}; struct A { X x : 2; // { dg-error "7:bit-field .x. with non-integral type .X." } }; struct B : A {}; template struct C { T t : 3; }; C c; template struct D { T t : 3; // { dg-error "5:bit-field .double D\\::t. with non-integral type .double." } }; D d; // { dg-message "required" } template struct E { typedef T* U; U t : 3; // { dg-error "5:bit-field .t. with non-integral type .E\\::U." } }; E e;