summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/expr/bool1.C
blob: 503e8b40c8c48afc592c863273a9d6e19b7f636d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-do run }
// PR C++/29295
// make sure that a typedef for a bool will have the
//  the same results as a bool itself.

extern "C" void abort();
typedef bool my_bool;
int main()
{ 
  my_bool b = false;
  int i;

  b++; // { dg-warning "deprecated" }
  b++; // { dg-warning "deprecated" }
  i = b;
  if (i != 1)
    abort ();
  return 0;
}