aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/warn/pr8715.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/warn/pr8715.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/warn/pr8715.C11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/warn/pr8715.C b/gcc-4.9/gcc/testsuite/g++.dg/warn/pr8715.C
new file mode 100644
index 000000000..330c148bb
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/warn/pr8715.C
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-Wsign-compare" } */
+
+int foo()
+{
+ unsigned char b = '1';
+
+ bool x = ~b; /* { dg-warning "promoted ~unsigned is always non-zero" } */
+
+ return 0;
+}