1 // RUN: %clang -Wall -ffreestanding -fsyntax-only -Xclang -verify %s
19 c
= 1 << -1; // expected-warning {{shift count is negative}}
20 c
= 1 >> -1; // expected-warning {{shift count is negative}}
26 c
<<= -1; // expected-warning {{shift count is negative}}
27 c
>>= -1; // expected-warning {{shift count is negative}}
28 c
<<= 999999; // expected-warning {{shift count >= width of type}}
29 c
>>= 999999; // expected-warning {{shift count >= width of type}}
30 c
<<= CHAR_BIT
; // expected-warning {{shift count >= width of type}}
31 c
>>= CHAR_BIT
; // expected-warning {{shift count >= width of type}}
32 c
<<= CHAR_BIT
+1; // expected-warning {{shift count >= width of type}}
33 c
>>= CHAR_BIT
+1; // expected-warning {{shift count >= width of type}}
34 (void)((long)c
<< CHAR_BIT
);
39 enum { b
= (a
<< ashift
) };