URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [Wenum-compare-1.c] - Rev 414
Go to most recent revision | Compare with Previous | Blame | View Log
/* { dg-do compile } */ /* { dg-options "-Wenum-compare" } */ enum E1 { A, B, C }; enum E2 { D, E, F }; extern void f2 (); void f1 () { int a = A; int d = D; enum E1 e1 = A; enum E2 e2 = D; if (A > D) /* { dg-warning "comparison between .enum E1. and .enum E2." } */ f2 (); if (e1 > e2) /* { dg-warning "comparison between .enum E1. and .enum E2." } */ f2 (); if (e1 > e2 + 1) f2 (); if (A > 0) f2 (); if (e1 > 0) f2 (); if (A + D > 0) f2 (); if (e1 > 0) f2 (); if (A + D > 0) f2 (); if ((int) A > D) f2 (); if ((int) e1 > e2) f2 (); }
Go to most recent revision | Compare with Previous | Blame | View Log