Created
June 21, 2013 15:28
-
-
Save jfager/5831988 to your computer and use it in GitHub Desktop.
This file contains 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
#include<stdio.h> | |
main() { | |
long long a = -9223372036854775808; | |
long long b = a * -1; | |
printf("%lld\n", b); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jasonf-mbp:overflow jasonf$ gcc -ftrapv overflow.c -o overflow
overflow.c:4:18: warning: integer constant is so large that it is unsigned
overflow.c: In function ‘main’:
overflow.c:4: warning: this decimal constant is unsigned only in ISO C90
jasonf-mbp:overflow jasonf$ ./overflow
-9223372036854775808