aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/Wswitch-outside-range-4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/c-c++-common/Wswitch-outside-range-4.c')
-rw-r--r--gcc/testsuite/c-c++-common/Wswitch-outside-range-4.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/Wswitch-outside-range-4.c b/gcc/testsuite/c-c++-common/Wswitch-outside-range-4.c
new file mode 100644
index 0000000..d9bd756
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wswitch-outside-range-4.c
@@ -0,0 +1,9 @@
+// PR c++/90875
+// { dg-options "-Wno-pedantic -Wno-switch-outside-range" }
+
+void f(char c)
+{
+ switch (c)
+
+ case -300 ... 300:; // { dg-bogus "lower value in case label range less than minimum value for type|upper value in case label range exceeds maximum value for type" }
+}