Skip to content

Instantly share code, notes, and snippets.

Created November 12, 2014 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/d9f057e910349da0ceba to your computer and use it in GitHub Desktop.
Save anonymous/d9f057e910349da0ceba to your computer and use it in GitHub Desktop.
> cat test.c
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
int
main(int argc, char **argv) {
struct {
int foo:1;
} a;
a.foo = 1;
printf("%d\n", a.foo);
if (a.foo == 1)
printf("It's 1\n");
exit(0);
}
> cc test.c -o foo
> ./foo
-1
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment