return0ULL<<64;// expected-warning{{The result of the left shift is undefined due to shifting by '64', which is greater or equal to the width of type 'unsigned long long'}}
return0ULL<<65;// expected-warning{{The result of the left shift is undefined due to shifting by '65', which is greater or equal to the width of type 'unsigned long long'}}
return1<<a;// expected-warning{{The result of the left shift is undefined due to shifting by '323', which is greater or equal to the width of type 'int'}}
}
return0;
}
inttestNegativeShift(inta){
if(a==-5){
return1<<a;// expected-warning{{The result of the left shift is undefined because the right operand is negative}}
returna<<30;// expected-warning{{The result of the left shift is undefined due to shifting '8' by '30', which is unrepresentable in the unsigned version of the return type 'int'}}