Re: Is it a bug when use “<<”if the operator is out of the size "0~63"
Jonathan Wakely
jwakely.gcc@gmail.com
Fri Feb 24 13:49:00 GMT 2012
This question is not appropriate for this mailing list, questions
about using GCC should be sent to the gcc-help@gcc.gnu.org list,
please take any follow up there, thanks.
On 24 February 2012 08:34, Yang Yueming wrote:
>
> The result of xyz should be "0",but it is "2468acf123579bc" ,same as xyz = abc << 1,Why?
The C standard says it's undefined behaviour:
"If the value of the right operand is negative or is greater than or
equal to the width of the promoted left operand, the behavior is
undefined."
More information about the Gcc
mailing list