view gcc/testsuite/g++.dg/warn/Wenum-compare.C @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
line wrap: on
line source

/* 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 "13:comparison between" } */
}