[Ilugc] Regarding gcc compiler in Linux

Sangharsha p g sangulinux at rediffmail.com
Tue Mar 1 14:23:20 IST 2005


  
Hi all,
  with tha following code compiled in Linux it gives a warning message as given below

 #include <stdio.h>
int main()
{
   unsigned int a=0xffffffff;
   unsigned int b=a<<32;

}
gcc test.c
test.c: In function `main':
test.c:5: warning: left shift count >= width of type
Can anyone help me why this warning message is coming.
The expected value of b should be 0 but it is displaying something else.
Regards,
Sangharsh



More information about the ilugc mailing list