aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/expr/bitfield3.C
blob: ba4c5fac81d061195813e587033cb50369f5f6ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// PR c++/30274

struct S {
  bool x : 4;
};

S s;

void f() {
  s.x--; // { dg-error "5:use of an operand of type .bool." }
  --s.x; // { dg-error "7:use of an operand of type .bool." }
}