mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-21 02:50:27 +08:00
compare8.c: New test case.
* gcc.dg/compare8.c: New test case. Co-Authored-By: Roger Sayle <roger@eyesopen.com> From-SVN: r79891
This commit is contained in:
parent
cba4497d92
commit
5a93e8dea1
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
15
gcc/testsuite/gcc.dg/compare8.c
Normal file
15
gcc/testsuite/gcc.dg/compare8.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* { 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" } */
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user