RE: infinite for-loop and related question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> No. The C and C++ standards define that unsigned integers do not
> overflow, they wrap, with well-defined behaviour.

Aha, thank  you!

Though I still find the output of this odd:

  for (char i(1); i>0; ++i) 
    printf("%d %d\n", i, sizeof(i));

...
362195 1
362196 1
362197 1
...

For very large values of char!  ^_^

Jason

 		 	   		  



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux