Skip to content

Instantly share code, notes, and snippets.

@maluta
Created November 4, 2009 16:18
Show Gist options
  • Save maluta/226162 to your computer and use it in GitHub Desktop.
Save maluta/226162 to your computer and use it in GitHub Desktop.
#include <stdio.h>
struct teste {
unsigned int a0 : 1;
unsigned int a1 : 1;
unsigned int a2 : 2;
unsigned int a3 : 4;
};
struct teste1 {
unsigned int a0 : 1;
unsigned int a1 : 1;
unsigned int a2 : 2;
unsigned int a3 : 4;
} __attribute__((__packed__));
int main(int argc, char *argv[]) {
struct teste t1;
struct teste1 t2;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment