blob: 0cb89e627ac27b0d0d80d1c4010d4e6b1496a3be [file] [log] [blame]
// PR c++/37932
// { dg-do compile { target c++11 } }
typedef enum { AA=1, BB=2 } my_enum;
typedef struct { my_enum a:4 ; unsigned b:28; } stru; // { dg-warning "width.*exceeds its type" "" { target { ! int32plus } } }
void foo (char c, my_enum x, int i)
{
char arr[2] = {c+'0', 0}; // { dg-error "narrowing" }
stru s = {x,0};
}