aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.1/gcc/testsuite/gcc.dg/Wswitch-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8.1/gcc/testsuite/gcc.dg/Wswitch-2.c')
-rw-r--r--gcc-4.8.1/gcc/testsuite/gcc.dg/Wswitch-2.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/gcc-4.8.1/gcc/testsuite/gcc.dg/Wswitch-2.c b/gcc-4.8.1/gcc/testsuite/gcc.dg/Wswitch-2.c
deleted file mode 100644
index 79ba4bdcb..000000000
--- a/gcc-4.8.1/gcc/testsuite/gcc.dg/Wswitch-2.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Further -Wswitch tests. */
-/* { dg-do compile } */
-/* { dg-options "-Wswitch" } */
-
-enum e { e1 = 0, e2 = 1, e3 = 1, e4 = 2 };
-
-int
-foo (enum e ei, int j)
-{
- switch (ei)
- {
- case e1: return 1;
- case e3: return 2;
- case e4: return 3;
- } /* No warning here since e2 has the same value as e3. */
- switch (ei) /* { dg-warning "enumeration value 'e4' not handled in switch" "enum e4" } */
- {
- case e1: return 1;
- case e2: return 2;
- }
- switch ((int) ei)
- {
- case e1: return 1;
- } /* No warning here since switch condition was cast to int. */
- switch ((enum e) j) /* { dg-warning "enumeration value 'e1' not handled in switch" "enum e1" } */
- {
- case e2: return 1;
- case e4: return 2;
- }
- return 0;
-}