aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/warning10.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/warning10.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/warning10.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/warning10.C b/gcc/testsuite/g++.old-deja/g++.jason/warning10.C
new file mode 100644
index 00000000000..8dbf5ed3217
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/warning10.C
@@ -0,0 +1,19 @@
+// Don't warn about these comparisons.
+// Build don't link:
+// Special g++ Options: -W -Wall
+
+struct A {
+ unsigned int b : 28;
+};
+
+int f (int i, unsigned char u, A a, unsigned long ul)
+{
+ if ((u & 0x10) == 0)
+ return 1;
+ if (i == 0U)
+ return 1;
+ if (a.b > ul)
+ return 1;
+
+ return 0;
+}