Sign in
gnu
/
gcc
/
a6d3012b274f38b20e2a57162106f625746af6c6
/
.
/
gcc
/
testsuite
/
c-c++-common
/
Wshift-count-negative-1.c
blob: 6807b9853391c88ffa267ad6a914db4bec07725a [
file
] [
log
] [
blame
]
/* { dg-do compile } */
/* { dg-options "-Wshift-count-negative" } */
void
foo
()
{
unsigned
i1
=
1U
<<
-
1
;
/* { dg-warning "20:left shift count is negative" } */
unsigned
i2
=
1U
>>
-
1
;
/* { dg-warning "20:right shift count is negative" } */
}