aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/switch-7.c
blob: 29cb82569914884b5643955fc37491cab96f844d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* Test diagnostics for switch statements and labels therein.  Test
   for case ranges with -pedantic-errors.  */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
/* { dg-options "-pedantic-errors" } */

void
f (int a)
{
  switch (a)
    {
    case 0 ... 0: ; /* { dg-error "range expressions in switch statements are non-standard" } */
    }
}