Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/compare8.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 /* { dg-options "-Wsign-compare" } */ | |
3 | |
4 int | |
5 f(unsigned short a1, unsigned short a2, unsigned int b) | |
6 { | |
7 return ((a1+a2)|5) > b ? 2 : 3; /* { dg-bogus "changes signedness" } */ | |
8 } | |
9 | |
10 int | |
11 g(unsigned short a1, unsigned short a2, unsigned int b) | |
12 { | |
13 return ((a1+a2)&5) > b ? 2 : 3; /* { dg-bogus "changes signedness" } */ | |
14 } | |
15 | |
16 int | |
17 h(unsigned short a1, unsigned short a2, unsigned int b) | |
18 { | |
19 return ((a1+a2)^5) > b ? 2 : 3; /* { dg-bogus "changes signedness" } */ | |
20 } | |
21 |