summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/expr/bool1.C
blob: bfb40e33092fa4bb1873bbee35374c441062de93 (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++;
  b++;
  i = b;
  if (i != 1)
    abort ();
  return 0;
}