@@ -233,10 +233,10 @@ void test4(short s) {
233233 // All negative shorts are cast towards the max unsigned range. Relation
234234 // comparisons are possible, but equality comparisons are tautological.
235235 const unsigned A = 32768 ;
236- void (s < A); // expected-warning{{comparison of integers of different signs: 'short' and 'const unsigned int'}}
237- void (s > A); // expected-warning{{comparison of integers of different signs: 'short' and 'const unsigned int'}}
238- void (s <= A); // expected-warning{{comparison of integers of different signs: 'short' and 'const unsigned int'}}
239- void (s >= A); // expected-warning{{comparison of integers of different signs: 'short' and 'const unsigned int'}}
236+ void (s < A); // expected-warning{{comparison of integers of different signs: 'short' and 'unsigned int'}}
237+ void (s > A); // expected-warning{{comparison of integers of different signs: 'short' and 'unsigned int'}}
238+ void (s <= A); // expected-warning{{comparison of integers of different signs: 'short' and 'unsigned int'}}
239+ void (s >= A); // expected-warning{{comparison of integers of different signs: 'short' and 'unsigned int'}}
240240
241241 void (s == A); // expected-warning{{comparison of constant 32768 with expression of type 'short' is always false}}
242242 void (s != A); // expected-warning{{comparison of constant 32768 with expression of type 'short' is always true}}
@@ -245,12 +245,12 @@ void test4(short s) {
245245 // unsigned. Likewise, a negative one short can also be converted to max
246246 // unsigned.
247247 const unsigned B = -1 ;
248- void (s < B); // expected-warning{{comparison of integers of different signs: 'short' and 'const unsigned int'}}
248+ void (s < B); // expected-warning{{comparison of integers of different signs: 'short' and 'unsigned int'}}
249249 void (s > B); // expected-warning{{comparison 'short' > 4294967295 is always false}}
250250 void (s <= B); // expected-warning{{comparison 'short' <= 4294967295 is always true}}
251- void (s >= B); // expected-warning{{comparison of integers of different signs: 'short' and 'const unsigned int'}}
252- void (s == B); // expected-warning{{comparison of integers of different signs: 'short' and 'const unsigned int'}}
253- void (s != B); // expected-warning{{comparison of integers of different signs: 'short' and 'const unsigned int'}}
251+ void (s >= B); // expected-warning{{comparison of integers of different signs: 'short' and 'unsigned int'}}
252+ void (s == B); // expected-warning{{comparison of integers of different signs: 'short' and 'unsigned int'}}
253+ void (s != B); // expected-warning{{comparison of integers of different signs: 'short' and 'unsigned int'}}
254254
255255}
256256
0 commit comments