Daily bump.
[official-gcc.git] / gcc / testsuite / g++.dg / expr / bitfield4.C
blob7b27b7247850032098f7e93b5c351307892fad17
1 // PR c++/30274
2 // { dg-do link }
4 struct S {
5   bool x : 4;
6 };
8 S s;
10 template <typename T>
11 void f(T);
13 template <>
14 void f(bool) {} 
16 int main() {
17   f(s.x++); // { dg-warning "7:use of an operand of type .bool. in .operator\\+\\+. is deprecated" "" { target { ! c++17 } } }
18   // { dg-error "forbidden" "" { target c++17 } .-1 }
19   f(++s.x); // { dg-warning "9:use of an operand of type .bool. in .operator\\+\\+. is deprecated" "" { target { ! c++17 } } }
20   // { dg-error "forbidden" "" { target c++17 } .-1 }