1 /* { dg-do preprocess } */
2 /* { dg-options "-Wall" } */
4 /* Test that -Wall emits the warnings about integer promotion changing
5 the sign of an operand. */
7 #if -1 > 0U /* { dg-warning "changes sign when promoted" } */
10 #if 0U + -1 /* { dg-warning "changes sign when promoted" } */
13 #if 0U * -1 /* { dg-warning "changes sign when promoted" } */
16 #if 1U / -2 /* { dg-warning "changes sign when promoted" } */
19 #if -1 % 1U /* { dg-warning "changes sign when promoted" } */
22 #if 1 ? 0U : -1 /* { dg-warning "changes sign when promoted" } */
25 #if 1 ? -1 : 0U /* { dg-warning "changes sign when promoted" } */