Debian Codegraph @

gcc/testsuite/g++.dg/expr/bitfield6.C

raw
1 // PR c++/30274
2
3 struct S {
4 bool x : 4;
5 };
6
7 S s;
8
9 void f() {
10 ++s.x = false; // { dg-warning "7:use of an operand of type .bool. in .operator\\+\\+. is deprecated" "" { target { ! c++17 } } }
11 // { dg-error "forbidden" "" { target c++17 } .-1 }
12 }