2 /* { dg-do compile } */
3 /* { dg-options "-O -Wextra" } */
4 /* { dg-additional-options "-std=c++11" { target c++ } } */
9 C
= -1 << 1, /* { dg-warning "left shift of negative value|not an integer constant" } */
10 /* { dg-error "left operand of shift expression" "shift" { target c++ } .-1 } */
19 /* Warn for LSHIFT_EXPR. */
26 r
+= m
<< x
; /* { dg-warning "left shift of negative value" } */
29 r
+= -1 << x
; /* { dg-warning "left shift of negative value" } */
37 /* Shouldn't warn for RSHIFT_EXPR. */