summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/Wenum-compare.C
blob: f60080039fbef2d2f9141d4613d3d298cda86d61 (plain)
1
2
3
4
5
6
7
8
9
10
/* Test that we get the -Wenum-compare by default.  See PR27975.  */
/* { dg-do compile } */
/* { dg-options "" } */
enum E1 { a };
enum E2 { b };

int foo (E1 e1, E2 e2)
{
  return e1 == e2;  /* { dg-warning "comparison between" } */
}