Skip to content

Instantly share code, notes, and snippets.

@mlabbe
Created February 25, 2019 23:40
Show Gist options
  • Save mlabbe/e7cf495977aca6c33effde2d7d25603f to your computer and use it in GitHub Desktop.
Save mlabbe/e7cf495977aca6c33effde2d7d25603f to your computer and use it in GitHub Desktop.
zero tuple
typedef union {
struct tuple_s { char a; short b; long long c; }tuple;
uint64_t _all[sizeof(struct tuple_s)/sizeof(uint64_t)];
}zero_tuple_u;
int main() {
zero_tuple_u t = {._all = {0}};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment