aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/wtr-switch-1.c
blob: f0381bc5e3797fbfa701417336ea65ca1b00a131 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* Test for -Wtraditional warnings on switch operands of type long.
   Note, gcc should omit these warnings in system header files.
   By Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8/22/2000.  */
/* { dg-do compile } */
/* { dg-options "-Wtraditional" } */

void
testfunc (l)
     long l;
{
  switch (l) /* { dg-warning "switch expression" "switch expression" } */
  {
  default:
    break;
  }

# 17 "sys-header.h" 3
/* We are in system headers now, no -Wtraditional warnings should issue.  */

  switch (l)
  {
  default:
    break;
  }
}