Skip to content

Instantly share code, notes, and snippets.

@KristianLyng
Created October 29, 2014 15:34
Show Gist options
  • Select an option

  • Save KristianLyng/b80cd2742e7ca80f0e64 to your computer and use it in GitHub Desktop.

Select an option

Save KristianLyng/b80cd2742e7ca80f0e64 to your computer and use it in GitHub Desktop.
kristian@edwin:~$ cat foo.c
#include <stdint.h>
#include <stdio.h>
int main(void) {
uintmax_t a=10,b=20,c=100;
uint8_t d=10,e=20,f=100;
if (a - b > c) printf("uintmax_t underflow\n");
if (d - e > f) printf("uint8_t underflow\n");
return 0;
}
kristian@edwin:~$ gcc foo.c
kristian@edwin:~$ ./a.out
uintmax_t underflow
kristian@edwin:~$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment