OSDN Git Service

* tree-loop-linear.c (try_interchange_loops): Compare memory access
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / cpp / Wsignprom.c
1 /* { dg-do preprocess } */
2 /* { dg-options "-Wall" } */
3
4 /* Test that -Wall emits the warnings about integer promotion changing
5    the sign of an operand.  */
6
7 #if -1 > 0U  /* { dg-warning "changes sign when promoted" } */
8 #endif
9
10 #if 0U + -1  /* { dg-warning "changes sign when promoted" } */
11 #endif
12
13 #if 0U * -1  /* { dg-warning "changes sign when promoted" } */
14 #endif
15
16 #if 1U / -2  /* { dg-warning "changes sign when promoted" } */
17 #endif
18
19 #if -1 % 1U  /* { dg-warning "changes sign when promoted" } */
20 #endif
21
22 #if 1 ? 0U : -1  /* { dg-warning "changes sign when promoted" } */
23 #endif
24
25 #if 1 ? -1 : 0U  /* { dg-warning "changes sign when promoted" } */
26 #endif