Debian Codegraph @

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

raw
1 // { dg-do compile }
2 // make sure that a typedef for a bool will have the
3 // the same results as a bool itself.
4
5
6 typedef volatile bool my_bool;
7 int main()
8 {
9 my_bool b = false;
10 b--; // { dg-error "3:use of an operand of type .bool. in .operator\\-\\-. is forbidden" }
11 // { dg-warning ".volatile.-qualified type is deprecated" "" { target c++2a } .-1 }
12 return 0;
13 }