[Ilugc] Regarding gcc compiler in Linux

  • From: sangulinux@xxxxxxxxxxxxxx (Sangharsha p g)
  • Date: Tue Mar 1 19:53:22 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

Other related posts: