blob: 4b0bb77509c643d4bfa8485df47fb41c32b62c26 [file] [log] [blame]
// { dg-do compile { target c++11 } }
// { dg-options "" }
struct S {
char a [[gnu::packed]] = 1; // { dg-warning "attribute ignored for field of type" }
char b [[gnu::packed]] : 8;
char c [[gnu::packed]] : 8 = 2; // { dg-warning "default member initializers for bit-fields only available with" "" { target c++17_down } }
};
template <typename U>
struct T {
U d [[gnu::packed]] = 1; // { dg-warning "attribute ignored for field of type" }
U e [[gnu::packed]] : 8;
U f [[gnu::packed]] : 8 = 2; // { dg-warning "default member initializers for bit-fields only available with" "" { target c++17_down } }
};
T<char> t;