summaryrefslogtreecommitdiff
path: root/regress/usr.bin/xlint/test-4.c
diff options
context:
space:
mode:
Diffstat (limited to 'regress/usr.bin/xlint/test-4.c')
-rw-r--r--regress/usr.bin/xlint/test-4.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/regress/usr.bin/xlint/test-4.c b/regress/usr.bin/xlint/test-4.c
new file mode 100644
index 00000000000..767d5788d75
--- /dev/null
+++ b/regress/usr.bin/xlint/test-4.c
@@ -0,0 +1,31 @@
+/* $OpenBSD: test-4.c,v 1.1 2005/11/26 20:45:30 cloder Exp $ */
+
+/*
+ * Placed in the public domain by Chad Loder <cloder@openbsd.org>.
+ *
+ * Test parsing of GNU case ranges.
+ */
+
+/* ARGSUSED */
+int
+main(int argc, char* argv[])
+{
+ int i;
+ char c;
+
+ c = 'a';
+ switch (c)
+ {
+ case 'a':
+ i = 0;
+ break;
+ case 'A' ... 'Z':
+ i = 1;
+ break;
+ default:
+ i = 1;
+ }
+
+ i++;
+ return 0;
+}