Created
August 24, 2016 12:14
-
-
Save KristianLyng/6d4ff782d37221c62bc7d6298da97d2c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kly@leia:~$ cat foo.c | |
#include <stdio.h> | |
#include <limits.h> | |
int main(void) { | |
unsigned int i = UINT_MAX; | |
if (i > i+1) { | |
printf("i is larger than i + 1\n"); | |
} else { | |
printf("i is not larger than i + 1\n"); | |
} | |
return 0; | |
} | |
kly@leia:~$ gcc foo.c | |
kly@leia:~$ ./a.out | |
i is larger than i + 1 | |
kly@leia:~$ gcc -O2 foo.c | |
kly@leia:~$ ./a.out | |
i is larger than i + 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment