summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/expr/bitfield3.C
blob: 3221263a9066931c415c82271ee27cb145baca68 (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 "Boolean expression" }
  --s.x; // { dg-error "Boolean expression" }
}