summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/warn2.C
blob: d505b29ae2ab1514040f61a6f158c4ce12d4a1c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// { dg-do assemble  }
// { dg-options "-Wall" }

enum Boolean {
  Ok = 0,
  NotOk = 1,
};

enum OpResult {
  Succeeded = 0,
  TempFail = 1,
  PermFail = 2,
};

OpResult fn1() {
  return TempFail;
}

extern void foo();

int
main () {
  if (fn1() == Ok) {	// { dg-warning "" } 
    foo();
  }
}