* gcc.dg/compare8.c: New test case.
Co-Authored-By: Roger Sayle <roger@eyesopen.com>
From-SVN: r79891
+2004-03-23 Joseph S. Myers <jsm@polyomino.org.uk>
+ Roger Sayle <roger@eyesopen.com>
+
+ * gcc.dg/compare8.c: New test case.
+
2004-03-23 Ziemowit Laski <zlaski@apple.com>
* g++.dg/ext/altivec-7.C: New test.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-Wsign-compare" } */
+
+int
+f(unsigned short a1, unsigned short a2, unsigned int b)
+{
+ return ((a1+a2)|5) > b ? 2 : 3; /* { dg-bogus "signed and unsigned" } */
+}
+
+int
+g(unsigned short a1, unsigned short a2, unsigned int b)
+{
+ return ((a1+a2)&5) > b ? 2 : 3; /* { dg-bogus "signed and unsigned" } */
+}
+