[Bug c/14611] static unsigned int small= -1U;
ierdnah at go dot ro
gcc-bugzilla@gcc.gnu.org
Wed Mar 17 11:47:00 GMT 2004
------- Additional Comments From ierdnah at go dot ro 2004-03-17 11:46 -------
ok, i understand, but why "small" isn't modified then, strange:
-----------
#define big 6
unsigned int small=-1;
if( small >= big ) printf("This sholdn't print!");
printf("\n%d",small);
printf("\n%x",small);
-----------
output:This sholdn't print!
-1
ffffffff -> because %x is unsigned
%d -> Signed decimal integer
%x -> Unsigned hexadecimal integer
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14611
More information about the Gcc-bugs
mailing list