On Mon, Jun 12, 2006 at 03:01:39PM +0200, Erik Meusel wrote:
> Use this little example to see what's happening:
>
> #include <stdio.h>
>
> int main(void) {
> char c = '\0';
>
> do {
> printf("%d\n", c);
%d is for int, not char: UB.
> c++;
char is neither signed nor unsigned. Only unsigned have defined overflow
behaviour.
> } while (c != '\0');
>
> return 0;
> }
Bastian
--
Power is danger.
-- The Centurion, "Balance of Terror", stardate 1709.2
Attachment:
signature.asc
Description: Digital signature