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-3.c] - Blame information for rev 867

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
    switch((T)a) /* { dg-warning "enumeration value 'a' not handled" "a" } */
9
    {
10
    case 1: /* { dg-warning "case value '1' not in enumerated" "1" } */
11
        break;
12
    }
13
    return 0;
14
}
15
 

powered by: WebSVN 2.1.0

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