OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [Wenum-compare-1.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-Wenum-compare" } */
3
enum E1 { A, B, C };
4
enum E2 { D, E, F };
5
extern void f2 ();
6
void
7
f1 ()
8
{
9
  int a = A;
10
  int d = D;
11
  enum E1 e1 = A;
12
  enum E2 e2 = D;
13
  if (A > D)    /* { dg-warning "comparison between .enum E1. and .enum E2." } */
14
    f2 ();
15
  if (e1 > e2)  /* { dg-warning "comparison between .enum E1. and .enum E2." } */
16
    f2 ();
17
  if (e1 > e2 + 1)
18
    f2 ();
19
  if (A > 0)
20
    f2 ();
21
  if (e1 > 0)
22
    f2 ();
23
  if (A + D > 0)
24
    f2 ();
25
  if (e1 > 0)
26
    f2 ();
27
  if (A + D > 0)
28
    f2 ();
29
  if ((int) A > D)
30
    f2 ();
31
  if ((int) e1 > e2)
32
    f2 ();
33
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.