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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [Wswitch-enum-2.c] - Blame information for rev 154

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -Wswitch-enum" } */
3
 
4
typedef enum { a = 2 } T;
5
 
6
int main()
7
{
8
    T x = a;
9
    switch(x)
10
    {
11
    case a ... 3: /* { dg-warning "case value '3' not in enumerated" "3" } */
12
        break;
13
    }
14
    switch(x)
15
    {
16
    case 1 ... a: /* { dg-warning "case value '1' not in enumerated" "1" } */
17
        break;
18
    }
19
    return 0;
20
}
21
 

powered by: WebSVN 2.1.0

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