This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
FW: Is it a bug when use â<<âif the opera tor is out of the size "0~63"
- From: Yang Yueming <yueming dot yang at huawei dot com>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Sat, 25 Feb 2012 00:49:23 +0000
- Subject: FW: Is it a bug when use â<<âif the opera tor is out of the size "0~63"
-----Original Message-----
From: Yang Yueming
Sent: Friday, February 24, 2012 4:35 PM
To: gcc@gcc.gnu.org
Subject: Is it a bug when use â<<âif the operator is out of the size "0~63"
Case:
#include <stdio.h>
#include <stdlib.h>
long long abc = 0x01234567891abcde;
long long xyz;
int main ()
{
xyz = abc << 65;
printf("%llx\n", xyz);
return 0;
}
The result of xyz should be "0"ïbut it is "2468acf123579bc" ,same as xyz = abc << 1,Why?
So as for "int a<<35"and etc..
YangYueming