This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/14611] static unsigned int small= -1U;


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]