summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/switch-6.c
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-14 23:24:14 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-14 23:24:14 +0000
commitb336acd54731e4258e4848b1e3409493a2ae780b (patch)
treea201846a39be53f6e3ecd20c4823e63363353116 /gcc/testsuite/gcc.dg/switch-6.c
parent4aab03406da1df304eabbdc6091720a789297ef8 (diff)
downloadgcc-b336acd54731e4258e4848b1e3409493a2ae780b.tar.gz
* gcc.dg/c99-flex-array-5.c, gcc.dg/c99-fordecl-3.c,
gcc.dg/comp-goto-1.c, gcc.dg/comp-goto-2.c, gcc.dg/comp-goto-3.c, gcc.dg/format/strfmon-2.c, gcc.dg/pointer-arith-1.c, gcc.dg/pointer-arith-2.c, gcc.dg/pointer-arith-3.c, gcc.dg/pointer-arith-4.c, gcc.dg/switch-5.c, gcc.dg/switch-6.c, gcc.dg/switch-7.c: New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90637 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/switch-6.c')
-rw-r--r--gcc/testsuite/gcc.dg/switch-6.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/switch-6.c b/gcc/testsuite/gcc.dg/switch-6.c
new file mode 100644
index 00000000000..70cc1882a4f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/switch-6.c
@@ -0,0 +1,14 @@
+/* Test diagnostics for switch statements and labels therein. Test
+ for case ranges with -pedantic. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-pedantic" } */
+
+void
+f (int a)
+{
+ switch (a)
+ {
+ case 0 ... 0: ; /* { dg-warning "warning: range expressions in switch statements are non-standard" } */
+ }
+}