[vox-tech] gcc warning question

Peter Jay Salzman vox-tech@lists.lugod.org
Tue, 15 Oct 2002 11:55:12 -0700


gcc warns:

   % .!gcc -W -Wall test.c
   test.c: In function `main':
   test.c:6: warning: large integer implicitly truncated to unsigned type

the variable was declared as an unsigned and the rvalue has the unsigned
suffix.  what's wrong with this code?   why is gcc complaining? 

pete



#include <stdio.h>

int main(void)
{
	unsigned int size = 99999999999u;

	printf("size is %u.\n", size);

	return 0;
}